Sponsored Content
Full Discussion: Change umask for apache user
Top Forums UNIX for Advanced & Expert Users Change umask for apache user Post 302880069 by phanidhar6039 on Tuesday 17th of December 2013 10:12:38 AM
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
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
apache(1M)						  System Administration Commands						apache(1M)

NAME
apache - Apache hypertext transfer protocol server overview DESCRIPTION
apache consists of a main server daemon, loadable server modules, some additional support utilities, configuration files, and documenta- tion. FILES
The apache HTTPD server is integrated with Solaris. The following files specify the installation locations for apache: /etc/apache Contains server configuration files. A newly-installed server must be manually configured before use. Typically this involves copying httpd.conf-example to the httpd.conf file and making local configuration adjustments. /usr/apache/bin Contains the httpd executable as well as other utility programs. /usr/apache/htdocs Contains the Apache manual in HTML format. This documentation is accessible by way of a link on the server test page that gets installed upon fresh installation. /usr/apache/include Contains the Apache header files, which are needed for building various optional server extensions with apxs(8) /usr/apache/jserv Contains documention for the mod_jserv java servlet module. Documention can be read with a web browser using the url: file:/usr/apache/jserv/docs/index.html /usr/apache/libexec Contains loadable modules (DSOs) supplied with the server. Any modules which are added using apxs(8)are also copied into this directory. /usr/apache/man Contains man pages for the server, utility programs, and mod_perl. Add this directory to your MANPATH to read the Apache man pages. See NOTES. /usr/apache/perl5 Contains the modules and library files used by the mod_perl extension to Apache. /var/apache/cgi-bin Default location for the CGI scripts. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/htdocs Default document root. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/icons Icons used by the server. This normally shouldn't need to be changed. /var/apache/logs Contains server log files. The formats, names, and locations of the files in this directory can be altered by various configuration directives in the httpd.conf file. /var/apache/proxy Directory used to cache pages if the caching feature of mod_proxy is enabled in the httpd.conf file. The location of the cache can also be changed by changing the proxy configuration in the httpd.conf file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWapchr | +-----------------------------+-----------------------------+ | |SUNWapchu | +-----------------------------+-----------------------------+ | |SUNWapchd | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) http://www.apache.org NOTES
In addition to the documentation and man pages included with Solaris, more information is available at http://www.apache.org The Apache man pages are provided with the programming modules. To view the manual pages for the Apache modules with the man command, add /usr/apache/man to the MANPATH environment variable. See man(1) for more information. Running catman(1M) on the Apache manual pages is not supported. SunOS 5.10 8 Aug 2000 apache(1M)
All times are GMT -4. The time now is 01:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy