- 论坛徽章:
- 0
|
5可用积分
服务器是centos,然后生产环境我是用的lampp来练手
默认时,htdocs网站目录的用户和组都是proftpd的nobody
然后我改变了网站目录的用户和组为apache
这时,ftp就失去了网站目录写入等777权限了
我怎么才能在apache运行网站目录的情况下,又能让ftp的nobody也可以拥有最大的权限呢,也就是能改变网站目录的777或775,或建立目录。。。。
下面这个是 proftpd.conf
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.
ServerName "ProFTPD"
ServerType standalone
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User nobody
#Group nogroup
# Normally, we want files to be overwriteable.
<Directory /opt/lampp/htdocs/*>
AllowOverwrite on
</Directory>
# only for the web servers content
DefaultRoot /opt/lampp/htdocs
# nobody gets the password "lampp"
# commented out by lampp security
#UserPassword nobody wRPBu8u4YP0CY
UserPassword nobody oFOOS27mrhc8A
# nobody is no normal user so we have to allow users with no real shell
RequireValidShell off
# nobody may be in /etc/ftpusers so we also have to ignore this file
UseFtpUsers off
|
[ 本帖最后由 6808849 于 2008-11-8 17:12 编辑 ] |
最佳答案
查看完整内容
第1个问题:如果就这样的话,要是真正的将网站开放,是不是带来安全隐患?如果是,那么我修改了这个目录的 用户和组 为 apache命令为:chown -R apache.apache /opt/lampp/htdocs/ 而这个时候呢,htdocs 目录的用户和组确实是 apache (755) 但运行程序就出现了问题,因为原本应该给予写入权限(777)的,现在都是7551 先确定你的apache 运行身份是否在用apache用户, 因为按你现在给的权限,如果apache 是用apache 身份运行不会有问 ...
|