[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703121: apache2: Apache2 ignores/overwrites UMASK setting of pam_umask



Hi,

On 15.03.2013 21:11, Michael Herold wrote:
> Package: apache2
> 
> I am running a server with a 'UMASK 027' setting in /etc/login.defs and
> pam_umask enabled. This leads to a default umask of 027 for all shell
> users. However I also expect the apache2 to run with this umask.

/etc/login.defs is for shell users, however the web server is started as
root and drops privileges after binding to the socket. Thus, this is a
expected behavior, given the Apache's parent process is init (PID: 1).

> Apache always runs with a umask of 022 causing cgi-scripts to create new
> files with rather generous permissions. This also implies that there are
> debian packages which expose private uploads to all users in /tmp/ with
> default settings. The behavior has been produced with fcgid and mod_php
> under squeeze and wheezy.

You can override the default umask by configuring /etc/apache2/envvars.
If you prfer, it also works to override the umask in /etc/init.d/apache2
which will be inherited to Apache.


-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: