Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache/php umask

Status
Not open for further replies.

roycrom

Programmer
Aug 2, 2002
184
GB
OK,

I don't believe it can be done but maybe I can figure it out with a few pointers.

I have two different ways of putting files on my web server which are a php content management system and FTP.

I use proftpd so can set my umask easily for FTP. I use a umask for ftp of "002" which makes the files group writable.

The php CMS has a umask of 026 however or creates files with 640 perms at least.

Could somebody tell how what happens when apache starts up?

if in httpd.conf I have User does apache not look in home folder and read .profile on startup?

I would have thought it does do this as I set some environmental variables in there for my java path etc.

I have tried setting the umask in .profile but it just won't register it after starting up apache.

Any help is greatly appreciated even a categorical "IT CAN'T BE DONE!"

------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla

roycrom :)
 
No, the httpd process does not read the .profile

I think it would have to be done explicitly in the CMS. Most of the HTTP upload classes (PEAR in particular) has a method of setting the upload mode. Whether the authors chose to use it is a defferent matter.
 
Thanks for the reply

as httpd does not read a .profile, where does it get its PATH variable and other environmental settings from?

thanks

------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla

roycrom :)
 
a) from the environment it is started from
b) from the defaults compiled into the binary
c) from the httpd.conf file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top