Re: Apache and umask for document root

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

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux