Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have used

[root ~]$ echo "umask 002" >> /etc/sysconfig/httpd
[root ~]$ service httpd restart

restarted apache many times but whenever i install something from script the directories are still not group writable.

What should i do

I have checked the file the umask 002 is at the end of file

share|improve this question

2 Answers 2

That's one of the standard ways to specify the umask for Apache in CentOS. If your init script (/etc/rc.d/init.d/httpd) sources the /etc/sysconfig/httpd file, either the umask is not specified or something is overriding it.

How are the files being created?

share|improve this answer

is nobody the user apache is running as? this is fairly common, apache, www-data and nobody are all fairly common. try ps ax | grep apache and see what shows up in the first row, and double check your configuration.

if nobody is the user apache is running as, then you will want to do sudo chown nobody.nobody /var/www/whatever/directory/ to change the ownership of the directory that apache needs rwx permissions to to nobody group nobody

then apache will be able to create files in that directory, and the subsequent scripts will be able to download/install their plugins, etc into the directory as well.

then, as i said before, you will manage the plugins and scripts, etc from the web interface, NOT from the shell.

in your apache httpd configuration file, there is a line that says User username where username is the name of whatever user apache httpd is run as on your system. your configuration file is potentially located at /etc/apache2/apache2.conf but it could be different, especially if you're running an older (1.x) version of apache's httpd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a>                   with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.1.28.2242\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Server Fault works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscr"], "copyright__copyright__copyright": [" interface, NOT from the shell.\n\nin your apache httpd configuration file, there is a line that says User username where username is the name of whatever user apache httpd is run as on your system. your configuration file is potentially located at /etc/apache2/apache2.conf but it could be different, especially if you're running an older (1.x) version of apache's httpd.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service."]}