SUSE 12 SP2 Install FTP

安装ftp

zypper -n install vsftpd vim
 

配置ftp

vi /etc/vsftpd.conf
# line 19: uncomment
write_enable=YES

# line 36: uncomment
ls_recurse_enable=YES

# line 53: uncomment
local_enable=YES

# line 62,63: uncomment ( enable chroot )
chroot_local_user=YES
chroot_list_enable=YES

# line 65: uncomment ( chroot list file )
chroot_list_file=/etc/vsftpd.chroot_list

# line 80: no anonymous
anonymous_enable=NO

# line 171,172: uncomment ( allow ascii mode )
ascii_upload_enable=YES
ascii_download_enable=YES

# add 214
allow_writeable_chroot=YES

# add 215
seccomp_sandbox=NO

创建默认目录

mkdir /etc/vsftpd.chroot_list

赋予权限

chmod -R 777 /etc/vsftpd.chroot_list/

添加ftp用户

useradd -d /home/wq/ weftp

如果错误添加以下

usermod -s /sbin/nologin weftp

配置密码

passwd weftp

创建默认FTP存放目录

mkdir /home/wq

赋予权限

chmod -R 777 /home/wq/

启动ftp服务

systemctl start vsftpd

开机启动ftp

systemctl enable vsftpd

报错1

Error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot() [SOLVED]
vi /etc/vsftpd.conf
解决方法
# add 214
allow_writeable_chroot=YES

报错2

Error: 500 OOPS: priv_sock_get_int [SOLVED]
vi /etc/vsftpd.conf
解决方法
# add 215
seccomp_sandbox=NO

你可能感兴趣的:(Suse)