|
|
就是以 anonymous 登录后 所在的那个目录,到底应该是用什么权限才能满足读取?
比如
vsftpd:x:47:47:vsFTPD User:/dev/null:/bin/false
ftp:x:45:45:ftp_anonymous:/home/ftp:/bin/false
我要 /home/ftp 这个目录的权限是 550 (不是 555)的话,要用哪个 user:group 才能列出里边的内容?我就是不想以 other身份 来访问。
我试过了 ftp,vsftpd,nobody 三种,循环作 user 和group,都不行。那倒是是要哪个才行?
权限设置为 550 后,访问的结果
- $ ftp localhost
- Connected to localhost.
- 220 (vsFTPd 2.0.4)
- Name (localhost:william): ftp
- 331 Please specify the password.
- Password:
- 230 Login successful.
- Remote system type is UNIX.
- Using binary mode to transfer files.
- ftp> ls
- 200 PORT command successful. Consider using PASV.
- 150 Here comes the directory listing.
- [color="Red"]226 Transfer done (but failed to open directory).[/color]
- ftp>
复制代码
权限为 555 的时候的结果。
- ftp> ls
- 200 PORT command successful. Consider using PASV.
- 150 Here comes the directory listing.
- -rw-r--r-- 1 0 0 0 Mar 26 03:08 home_ftp
- drwxr-xr-x 2 0 0 96 Mar 26 04:31 incoming
- 226 Directory send OK.
复制代码
配置文件
- listen=YES
- background=YES
- nopriv_user=vsftpd
- secure_chroot_dir=/var/ftp/empty
- anon_root=/home/ftp
- anonymous_enable=YES
- local_enable=YES
- write_enable=YES
- local_umask=022
- anon_upload_enable=YES
- anon_mkdir_write_enable=YES
- dirmessage_enable=YES
- xferlog_enable=YES
- connect_from_port_20=YES
- nopriv_user=vsftpd
- chroot_local_user=YES
- chroot_list_enable=YES
- chroot_list_file=/etc/vsftpd.chroot_list
复制代码 |
|