我如何找出用户的放大器;组Apache正在运行的? [英] How do I figure out what user & group Apache is running as?
问题描述
在DreamHost的共享主机,我设立htpasswd的,但是Apache没有权限读取文件。我怎么给它的权限?我想要么改变的所有者或组的 htpasswd的
文件,而不是给它不安全的权限。我不认为我有机会获得的httpd.conf
的文件,所以我不能用这个方法的找到Apache作为运行哪些用户。此外,运行顶
或的ps aux
只显示我正在运行的进程,但不显示Apache进程。
On DreamHost shared hosting, I'm setting up htpasswd, but Apache does not have permission to read the file. How do I give it permission? I want to either change the owner or group of the .htpasswd
file instead of giving it insecure permissions. I don't think I have access to the httpd.conf
file, so I can't use this method to find what user Apache runs as. Also, running top
or ps aux
only shows the processes I'm running but doesn't show the apache process.
这是 WWW的数据
。
Well, I followed the instructions for Password-protecting directories on Dreamhost. It generated a directory with a .htpasswd
file with the group dhapache
and permissions 440
. It also put a .htaccess
file in there with under my group. For some reason, when I try chgrp dhapache test_file.txt
I get chgrp: changing group of 'test_file.txt': Operation not permitted
. So, I just moved the .htpasswd
file that DreamHost generated to where I wanted it and edited the .htaccess
file it generated, despite its warnings.
推荐答案
其实,你并不需要访问的httpd.conf:
Actually, you don't need access to httpd.conf:
ps aux | grep apache2
groups apache_user
应该得到你想要的。
should yield what You want
这篇关于我如何找出用户的放大器;组Apache正在运行的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!