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//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?

4 Replies

Have you restarted apache since you added it to your group?

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

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

> That will (well, should) fix it

It did! Many thanks.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct