[program-l] Re: Apache/linux server dynamically changing file/folder permissions?

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx>
  • Date: Tue, 3 Sep 2013 12:22:20 +0000

Hi Jacob,
My memory tells me that Apache runs as a user called nobody. That user has very 
little permissions. That is for security reasons. I'm not sure what the best 
solution for this is in your scase.

Thanks.

Jim


From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Jacob Kruger
Sent: Saturday, August 31, 2013 7:09 PM
To: Program-l
Subject: [program-l] Apache/linux server dynamically changing file/folder 
permissions?

Just posting this here in case someone has an idea about how to 'fix' this/work 
around it - since haven't managed to find anything via 'net, or other PHP 
specific mailing lists as of yet.

In that small/simple content-management-system posted about other day, issue 
seems to be that while am continually/consistently setting output file and 
folder permissions to 0776 - owner and group rwx, and public rw - for now - 
using PHP's chmod() function, before and after trying to copy/generate any 
output content for it, the server seems to be 
consistently/dynamically/immediately resetting the permissions to something 
slightly different, which won't let me then view/browse all the content.

Silly/simple example is that I will handle image file upload, and copy uploaded 
image to a folder in a script, but, sort of immediately, that image, and the 
folder it's in, and that one's parent folder are 
invisible/unavailable/inaccessible.

Before I then run a sort of recursive script to again reset all content 
permissions, I can't even browse the content via FTP interface - for example.

When generating output/static content, I am also then consistently/continually 
resetting path permissions just before/after creating folders and files, if 
necessary, and that seems to work, some of the time, but, not for everything.

Am going to try it out on another server, just to try figure/find out if it's a 
specific issue for this server/part of file structure, or something, but, bit 
irritating thus far...<smile>

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

________________________________

This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
The views expressed in this e-mail message do not necessarily represent the 
views of Highmark, its diversified business, or affiliates.

Other related posts: