Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


File permissions on htdocs sub-dir

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Author Message
jti



Joined: 29 Oct 2007
Posts: 23

Posted: Fri Jan 18, 2008 9:34 am    Post subject: File permissions on htdocs sub-dir  

I seem to be having problems with file permissions. Apache runs as 'apache', and its htdocs dir is /home/<my_username>/www/htdocs. All works fine, except an upload script which allows users to upload files via a web-form to a sub-directory of the htdocs dir.

The file-uploads dir is set to 775, and apache is a member of my_username group. But I'm getting 'Couldn't open temp file for writing: Permission denied' errors on file upload unless I set the uploads dir to 777. Security is not really an issue as we're on a LAN with password access (for a small number of trusted users) to the application that does the file uploads.

As far as I know, 775 means user & group have read/write/execute permissions on the directory, and apache is a member of the group, so what is causing the problem?
Back to top  
SteveG



Joined: 30 Nov 2003
Posts: 214

Posted: Fri Jan 18, 2008 2:26 pm    Post subject:  

Have you restarted apache since you added it to your group?
Back to top  
jti



Joined: 29 Oct 2007
Posts: 23

Posted: Fri Jan 18, 2008 3:04 pm    Post subject:  

Quote: Have you restarted apache since you added it to your group?
Err, no :( I'll do so next chance I get and report back.
Back to top  
SteveG



Joined: 30 Nov 2003
Posts: 214

Posted: Fri Jan 18, 2008 5:41 pm    Post subject:  

That will (well, should) fix it. Changes to group membership don't affect existing processes.
Back to top  
jti



Joined: 29 Oct 2007
Posts: 23

Posted: Mon Jan 21, 2008 8:38 am    Post subject:  

Quote: That will (well, should) fix it

It did! Many thanks.
Back to top  
 
       Linode.com Forum Forum Index -> Linux, Apache, Mysql and PHP (LAMP) Forum
Page 1 of 1