On 10/27/2016 02:27 PM, Alex wrote:
How is it set for the normal user? I've modified /etc/bashrc (and even
/etc/profile), and the apache user doesn't have a .bashrc or
.bash_profile, and it's still 0022.

It's difficult to tell what you're doing wrong, because you aren't being specific about what you're changing. /etc/profile is used for login shells. /etc/bashrc will be used for interactive shells, but only if the user's ~/.bashrc exists and loads it.

For example, the "apache" user doesn't have a .bashrc file, so setting a custom umask in /etc/profile or /etc/profile.d/whatever.sh will work, but /etc/bashrc won't.

[root@vagabond ~]# su - -s /bin/bash apache
-bash-4.3$ umask
0022
-bash-4.3$ logout
[root@vagabond ~]# echo umask 002 >> /etc/profile
[root@vagabond ~]# su - -s /bin/bash apache
-bash-4.3$ umask
0002
-bash-4.3$ logout
[root@vagabond ~]# vi /etc/profile
[root@vagabond ~]# su - -s /bin/bash apache
-bash-4.3$ umask
0022
-bash-4.3$ logout
[root@vagabond ~]# echo umask 002 >> /etc/bashrc
[root@vagabond ~]# su - -s /bin/bash apache
-bash-4.3$ umask
0022

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to