Change umask for apache user


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Change umask for apache user
# 1  
Old 12-17-2013
Change umask for apache user

Hi,

I need to change the umask for apache user so that the other group memebers have write access to the files. The apache user has no login shell running under centos 5.6. Currently apache user have 022 umask and i need to change to 002 so that other group memeber can have write access to that file.

The httpd service runs under apache user and the file are created using php open file function.

Now i have couple of options

1. Add the line in httpd file as below and restart the service

Code:
 
   [root ~]$ echo "umask 002" >> /etc/sysconfig/httpd
   [root ~]$ service httpd stop
   [root ~]$ service httpd start

2. change the uid of the apache user above 99 so that by default it gets the 002 umask as it has same group name as that of uid.

Not sure if the first approch works as i have got only one chance to test it.

Could anyone let me know if i am missing any steps in first step as i am thinking to add a line of umask 002 in /etc/init.d/httpd startup script at the start if the above step 1 doesnt work?

Thanks,
P

Last edited by phanidhar6039; 12-17-2013 at 11:21 AM.. Reason: Info
# 2  
Old 12-24-2013
1. seems right, try it.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

How can i do defult page apache change it?

Hi In the cent os Into the frist page Get link or redirect (2 Replies)
Discussion started by: mnnn
2 Replies

2. Web Development

Getting apache to see a LDAP group membership change

trying to implement authz to a webpage using require ldap-group. It works, except I need to do apachectl restart before the server will observe an add or a delete to the group. Seems like apache is acquiring the group membership at startup & caching it. It's a static group. I have apache... (0 Replies)
Discussion started by: maraixadm
0 Replies

3. Shell Programming and Scripting

How to change umask in shell scripting?

Hi, I have manually changed umak value by umask 0033 , After that i would like to change umask value into 0022 through shell scripting.. But it is changing while running the script. Once come out from script, it has not changed ... Ex: >umask 0033 >./1.sh 0022 >umask 0033 plz Any... (4 Replies)
Discussion started by: Mani_apr08
4 Replies

4. AIX

FTP user and Umask issue

Guy's I have user ID created in AIX calld FTPuser in AppServer Umask for this user ( FTPuser ) is umask 002 from my workstation I'm doing as the following ftp Appserver Connected to Appserver. 230 User FTPuser logged in. put testfile.sh file will be transferd but the issue... (1 Reply)
Discussion started by: ITHelper
1 Replies

5. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

6. Shell Programming and Scripting

How do i change to super user then revert back to ordinary user ,using shell script?

Hi all, I am trying to eject the cdrom from a livecd after certain stage... Now assuming that it is possible to eject,please consider my issue!!! The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive... However if i try pfexec eject it... (3 Replies)
Discussion started by: wrapster
3 Replies

7. IP Networking

Change the root directory for apache, sshd and ftpd

Helo ! I want to do something and I don't know where to start... I want to make a small web hosting server (just for me and a few friends) and for the sake of learning I'd like to make an account for every user. The thing is that I want everyone to log into the server and to be put in his home... (3 Replies)
Discussion started by: Sergiu-IT
3 Replies

8. AIX

list of default umask by user

Hi, Do you know if it's possible to have the user list with their umask on AIX system ? I need to check if they are OK but with smit and user by user, it will take all the day. :) An idea ? Thx a lot. (3 Replies)
Discussion started by: Zlikos
3 Replies
Login or Register to Ask a Question