01-15-07 12:23 AM
Danny.Willium@gmail.com writes:
>i didnt install it using ports i compiled it myself.
>the reason why i want it to run under web is because thats the user
>that made the database on pgsql.
>postgresql_enable= "yes"
>postgresql_data="/usr/local/pgsql/data"
>i already tried that, it doesnt work.
Thats because it depends on the startup scripts the ports area use, to
make match the rest of the BSD system. It seems to me, that you'd be
better off using ports, configured by somebody that knows how to do
it, rather than opening up security holes on your own to blame the OS later.
.
>could you please tell me how to run a script as a different user. i
>know this may not be the most secure / best method but i already made
>the mistake of configuring everything....
The same way you do it interactively, with 'su' (ie. the man page for
su will give you the proper options).
For example, see the ports startup script for pgsql.
As the previous poster posted, what you are trying to do is open a
huge security hole for yourself. Don't run pgsql as the web user,
nobody does it that way, its not designed to run that way, the
security model is designed not to run that way, but yet you want to
fight an uphill battle to make yourself a security hole.
IMHO, it'll be *much less* work for you to figure out how the ports
system is setup to do it, and move your existing data over to its
setup (which will be standard on other FreeBSD systems as well if you
run across them in the future), rather than to continue to forge your
own path without knowledge of how its designed to run.
[ Post a follow-up to this message ]
|