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

  • From: "Jacob Kruger" <jacob@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Tue, 3 Sep 2013 15:57:45 +0200

From phpinfo() - just pulled some of info off page rendering it:

linux 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64
Apache 2.0 Handler 
Virtual Directory Support disabled
PHP Version 5.3.3-7+squeeze16

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

  ----- Original Message ----- 
  From: Andy B. 
  To: program-l@xxxxxxxxxxxxx 
  Sent: Tuesday, September 03, 2013 3:12 PM
  Subject: [program-l] Re: Apache/linux server dynamically changing file/folder 
permissions?


  It depends on the linux distro as to the apache user. On most distros it is 
nobody, fedora it is apache, and Ubuntu it is www-data. It all depends on the 
apache package maintainer.

   

  From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] 
On Behalf Of Homme, James
  Sent: Tuesday, September 3, 2013 8:22 AM
  To: program-l@xxxxxxxxxxxxx
  Subject: [program-l] Re: Apache/linux server dynamically changing file/folder 
permissions?

   

  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: