0

This didn't work:

Setting the umask of the Apache user

Arch doesn't have a /etc/apache2/envvars file, and changing the /etc/rc.d/httpd script didn't change anything.

Maybe someone can enlighten me how/where to exactly change the rc-script, so apache has an umask 002

Community
  • 1
  • 1
SkaveRat
  • 2,124
  • 3
  • 18
  • 34
  • How did you detect that it doesn't work? – initall Apr 05 '11 at 21:25
  • @initall - I set the umask command in the rc-script and restarted the server with the rc-script. I let php via apache create a new directory, but it hat the same permissions as before. I'm not an expert on rc-scripts/shellscripts, so I'm probably doing something just very wrong here :/ – SkaveRat Apr 05 '11 at 23:07
  • Do you run PHP as a module or via CGI in your setup? – initall Apr 06 '11 at 07:29
  • If you set the umask via the PHP umask function, does that work? – initall Apr 06 '11 at 08:27
  • haven't tried it, but as the directories are created by a framework, I'd rather set it with apache – SkaveRat Apr 08 '11 at 17:37

1 Answers1

1

After trying again, strangely editing the /etc/rc.d/httpd file works.

Just put

umask 0002

Right after the #!/bin/bash and everything works as it should.

No idea why it didn't work before, but well...

SkaveRat
  • 2,124
  • 3
  • 18
  • 34