linux vsftpd无法上传和下载

vsftpd搭建好了,宿主机也可以连接到虚拟机的ftp服务
但是,用leapFTP工具连接时,随连接上了,却无法上传和下载
首先要确定把ftp的根目录设置成770权限
chmod 770 ftp
设置ftp所属的owner和group
chown root:ftp ftp
我是Linux菜鸟,这地方我就照着SELinux提示来做的,其实充分利用他的作用也会事半功倍
如: man ftpd selinux

出现如下提示,照着做就行了!
大家没必要看这下面的,在字符窗口敲 man ftpd selinux 就有了
tpd_selinux(8) ftpd SELinux policy documentation ftpd_selinux(8)

NAME
ftpd_selinux - Security-Enhanced Linux policy for ftp daemons.

DESCRIPTION
Security-Enhanced Linux provides security for ftp daemons via flexible
mandatory access control.

FILE_CONTEXTS
SELinux requires files to have a file type. File types may be specified
with semanage and are restored with restorecon. Policy governs the
access that daemons have to files.

Allow ftp servers to read the /var/ftp directory by adding the pub-
lic_content_t file type to the directory and by restoring the file
type.

semanage fcontext -a -t public_content_t "/var/ftp(/.*)?"

restorecon -R -v /var/ftp

Allow ftp servers to read and write /var/tmp/incoming by adding the
public_content_rw_t type to the directory and by restoring the file
type. This also requires the allow_ftpd_anon_write boolean to be set.

semanage fcontext -a -t public_content_rw_t "/var/ftp/incoming(/.*)?"

restorecon -R -v /var/ftp/incoming

BOOLEANS
SELinux policy is based on least privilege required and may also be
customizable by setting a boolean with setsebool.

Allow ftp servers to read and write files with the public_content_rw_t
file type.

setsebool -P allow_ftpd_anon_write on

Allow ftp servers to read or write files in the user home directories.

setsebool -P ftp_home_dir on

Allow ftp servers to read or write all files on the system.
setsebool -P allow_ftpd_full_access on

Allow ftp servers to use cifs for public file transfer services.

setsebool -P allow_ftpd_use_cifs on

Allow ftp servers to use nfs for public file transfer services.

setsebool -P allow_ftpd_use_nfs on

system-config-selinux is a GUI tool available to customize SELinux pol-
icy settings.

AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>.

SEE ALSO
selinux(8), ftpd(8), setsebool(8), semanage(8), restorecon(8)

dwalsh@redhat.com 17 Jan 2005 ftpd_selinux(8)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值