在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的数据
。
好了,我也跟着上Dreamhost的 密码保护目录的说明。它产生的一个目录中的 htpasswd的
同组文件 dhapache
和权限 440
。它也把的.htaccess
文件中有下我的团队。出于某种原因,当我尝试 chgrp命令dhapache test_file.txt
我得到 chgrp命令:改变组test_file.txt的:操作不允许
。所以,我刚搬到这DreamHost的产生的地方,我想它的 htpasswd的
文件并编辑了的.htaccess
文件,它产生的,尽管它的警告。
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