设置Apache用户的的umask [英] Setting the umask of the Apache user

查看:828
本文介绍了设置Apache用户的的umask的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设立一个LAMP服务器,想Apache的umask设置设置为002,让所有的Apache创建的文件具有组写入权限位集(所以同组的成员可以覆盖这些文件)。

I am setting up a LAMP server and would like to set Apache's umask setting to 002 so that all Apache-created files have the group write permission bit set (so members of the same group can overwrite the files).

有谁知道如何做到这一点?我知道,在Ubuntu,你可以使用/ etc / apache2的/ envvars中文件来配置的umask,但服务器在运行CentOS的。

Does anyone know how to do this? I know that on Ubuntu, you can use the /etc/apache2/envvars file to configure the umask, but the server is running CentOS.

更新
这个问题涉及到另一个问我前一阵子(<一个href=\"http://stackoverflow.com/questions/174715/linux-users-and-groups-for-a-lamp-server\">http://stackoverflow.com/questions/174715/linux-users-and-groups-for-a-lamp-server).如果prefered,请更新最好的设置是用于具有可编辑由Apache用户创建的文件服务器上的一个开发人员用户这是什么的其他问题。

Update This question is related to another I asked a while ago (http://stackoverflow.com/questions/174715/linux-users-and-groups-for-a-lamp-server). If prefered, please update this other question with what the best set-up is to use for having a developer user on a server that can edit files created by the apache user.

推荐答案

从Apache的父进程继承的umask(即进程启动Apache);这通常应该是/etc/init.d中的脚本。因此,在该脚本把umask命令。

Apache inherits its umask from its parent process (i.e. the process starting Apache); this should typically be the /etc/init.d script. So put a umask command in that script.

这篇关于设置Apache用户的的umask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆