LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1162|回复: 3

"UserDir userlist " in /etc/httpd/conf/httpd.conf

[复制链接]
发表于 2005-10-20 09:53:06 | 显示全部楼层 |阅读模式
I am configuring http server. Everything works fine, but there is one question about the variable "UserDir".

1. Suppose I have user1 and user2.  Create public_html under both /home/user1 and /home/user2.  Both ~userid is  711  and both public_html is 755.  Add index.html in both directories.

2. In /etc/httpd/conf/httpd.conf, enable UserDir only for user1:

UserDir enabled user1
UserDir public_html

3. Open firefox browser.

http://localhost/~user1
--> it works fine. OK.

http://localhost/~user2
-->it also works!!!! The content of the index.html displays. Why???? I think user2 should NOT see his file, since he is NOT on the userlist....

It seems a arequest to ~userid will work as long as this user has the UserDir directory public_html and he doesn't need to be on the UserDir userlist.....

Do I miss anything???????  Very confused....
发表于 2005-10-21 05:56:57 | 显示全部楼层
Post by zaiwen
I am configuring http server. Everything works fine, but there is one question about the variable "UserDir".

1. Suppose I have user1 and user2.  Create public_html under both /home/user1 and /home/user2.  Both ~userid is  711  and both public_html is 755.  Add index.html in both directories.

2. In /etc/httpd/conf/httpd.conf, enable UserDir only for user1:

UserDir enabled user1
UserDir public_html

3. Open firefox browser.

http://localhost/~user1
--> it works fine. OK.

http://localhost/~user2
-->it also works!!!! The content of the index.html displays. Why???? I think user2 should NOT see his file, since he is NOT on the userlist....

It seems a arequest to ~userid will work as long as this user has the UserDir directory public_html and he doesn't need to be on the UserDir userlist.....

Do I miss anything???????  Very confused....

Put a
  1. userdir disabled
复制代码
before the enabled directive.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-21 10:00:55 | 显示全部楼层
en...that makes sense....it means you have to explicitly disabled a userid?  Any userid that are not on "UserDir diabled userlist" will be enabled implicitly, even if it is not on "UserDir enabled userlist".  Can I "UserDir disabled ALL"?   and then "UserDir enabled user1 user3 user4"?

I will try it tomorrow....thanks.
回复 支持 反对

使用道具 举报

发表于 2005-10-22 00:08:05 | 显示全部楼层
userdir disabled implies disabling all except those in the enabled list.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表