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
RunApp::Apache(3pm)					User Contributed Perl Documentation				       RunApp::Apache(3pm)

NAME
RunApp::Apache - Apache control for RunApp SYNOPSIS
use RunApp::Apache; $apache = RunApp::Apache->new (root => "/tmp/apache_run", report => 1, apxs => '/usr/local/sbin/apxs', # httpd => '/usr/local/sbin/httpd', required_modules => ["log_config", "alias", "perl", "mime"], config_block => q{ [% IF AP_VERSION == 2 %] eval { use Apache2 }; eval { use Apache::compat }; [% END %] <Location /myapp> AllowOverride None SetHandler perl-script PerlSetVar approot [% cwd %] PerlHandler MyApp Options +ExecCGI </Location> }); DESCRIPTION
This is the class for defining a apache web server to be used in RunApp. CONSTRUCTOR
new (%arg) Required arg: root The root for the apache instance. apxs httpd If "apxs" is specified, "httpd" will be derived from it. required_modules A arrayref to the apache modules required. config_block The config block that will be the extra block in the template used by RunApp::Template::Apache. CTL The class for handling apachectl. The default is RunApp::Control::AppControl. You can also use RunApp::Control::ApacheCtl. CONF The class for handling apache config. The default is RunApp::Template::Apache. It is used in the "build" phase of RunApp SEE ALSO
RunApp, RunApp::Control::Apache, RunApp::Template::Apache, App::Control AUTHORS
Chia-liang Kao <clkao@clkao.org> Refactored from works by Leon Brocard <acme@astray.com> and Tom Insam <tinsam@fotango.com>. COPYRIGHT
Copyright (C) 2002-5, Fotango Ltd. This module is free software; you can redistribute it or modify it under the same terms as Perl itself. perl v5.8.8 2008-01-09 RunApp::Apache(3pm)
All times are GMT -4. The time now is 12:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy