On Wed, Aug 18, 2004 at 08:21:26PM +0200, Patrick Donker wrote: > Jacob S. wrote: > > >By default, when a file is uploaded via a php script or anything else > >through apache, it has permissions of 644. I would like this to be 640. > > > >I know php has a umask and a chmod function that could help with this, > >but this only fixes it for scripts that use php. Isn't there a way to > >change the default umask for the www-data user? > > > >Any tips for where to look or what to change would be greatly > >appreciated. > > > If I'm not mistaking you could set the sticky bit to the directory > Apache is uploading in. That way all files will always get the mode you > set. chmod 1640 <dir>
This doesn't appear to work. I just tested it with the example you show, uploaded a file and it still had permissions of 644. Thanks, Jacob -- GnuPG Key: 1024D/16377135 Random .signature #0: Never trust an operating system you don't have sources for. http://www.linux.org
signature.asc
Description: Digital signature