[thelist] chmod & PHP question

Anthony Baratta Anthony at Baratta.com
Sun Jul 23 22:21:24 CDT 2000


James Spahr wrote:
> 
> ok - PHP is running as user 'httpd', and the files & directories are owned
> by 'admin' or 'dev_df' - so how can I put them in the same group so 'httpd'
> has write access to these directories?

First off, I would create a user that you do all your work as. You shouldn't be a
high level user to create the web files themselves or the CGI scripts.  The lower the
permissions the better, you leave yourself less open to exploitation.

That said. You can create a group called "web" and add the web server and your 'web
user' to that. Then chown all the files and the directories so that all the files are
owned by your web user and the new web group. For those files/directories that have
write access for the web group will be writable by the httpd user. There is a way of
defaulting the creating of files by the web user to 'web user' and 'web group', but
it escapes be at the moment. Someone else here, if they are reading this, might be
able to answer that quicker than I can look it up.

-- 
Anthony Baratta
President
KeyBoard Jockeys
                    South Park Speaks Version 3 is here!!!
                       http://www.baratta.com/southpark
                              Powered by Tsunami




More information about the thelist mailing list