Chinaunix

标题: centos 6如何在不关闭selinux的前提下使用ftp服务 [打印本页]

作者: taojie2000    时间: 2011-07-15 12:53
本帖最后由 taojie2000 于 2011-07-15 12:56 编辑

回复 1# weiweiabc109


    ftpd_disable_trans         rw r  r   root        执行set .....  1 命令
作者: weiweiabc109    时间: 2011-07-15 12:56
啥意思  你让我自己创建一个吗?

在这里面创建文件还的先关闭selinux  唉
我试试
作者: taojie2000    时间: 2011-07-15 12:57
回复 3# weiweiabc109


    嗯 试试   你那规则不多啊  我这里 有 266个    centos版本和你不同
作者: weiweiabc109    时间: 2011-07-15 13:08
setenforce 0   然后touch后提示权限不够
ls -al 后发现root没有写权限
chmod u+w  后root有了写权限   再touch 还是权限不够

vim /etc/selinux/conf 干脆关闭selinux重启后   /linux下 空了……
作者: chenyx    时间: 2011-07-15 13:17
已经没有那个bool值了,下面的是rhel6 ftp相关的selinux的bool的信息:
SELinux is based on the least level of access required for a service to run. Services can be run
in a variety of ways; therefore, you must tell SELinux how you are running services. The following
Booleans allow you to tell SELinux how you are running vsftpd:
allow_ftpd_anon_write
When disabled, this Boolean prevents vsftpd from writing to files and directories labeled with the
public_content_rw_t type. Turn this Boolean on to allow users to upload files via FTP. The
directory where files are uploaded to must be labeled with the public_content_rw_t type and
Linux permissions set accordingly.
allow_ftpd_full_access
When this Boolean is on, only Linux (DAC) permissions are used to control access, and
authenticated users can read and write to files that are not labeled with the public_content_t
or public_content_rw_t types.
allow_ftpd_use_cifs
Having this Boolean enabled allows vsftpd to access files and directories labeled with the
cifs_t type; therefore, having this Boolean enabled allows you to share file systems mounted via
Samba through vsftpd.
allow_ftpd_use_nfs
Having this Boolean enabled allows vsftpd to access files and directories labeled with the nfs_t
type; therefore, having this Boolean enabled allows you to share file systems mounted via NFS
through vsftpd.

作者: taojie2000    时间: 2011-07-15 13:30
   版本差异啊
作者: weiweiabc109    时间: 2011-07-15 13:50
版主 {:3_186:}求链接
作者: chenyx    时间: 2011-07-15 14:22
回复 8# weiweiabc109


    记不住从哪下载的了,rhel的电子书,文件名称是"Red_Hat_Enterprise_Linux-6-Managing_Confined_Services-en-US"
作者: taojie2000    时间: 2011-07-15 14:26
回复 8# weiweiabc109


    Red_Hat_Enterprise_Linux-6-Managing_Confined_Services-en-US.pdf (500.85 KB, 下载次数: 197)

     在file transfer  标题下的  booleans
作者: weiweiabc109    时间: 2011-07-15 14:35
{:3_200:}
作者: kuhanzhu    时间: 2011-11-16 12:21
本帖最后由 kuhanzhu 于 2011-11-16 13:17 编辑

英文版看得我很有压力啊。
最近给自己搞服务器,ftp\mail\apache\php\MySQL\nginx 都搞定安装了。
惟独纠结SELinux和iptables

10楼的电子书很好。
作者: pppqqq114    时间: 2011-11-16 12:51
我一菜鸟 路过
作者: hmily36    时间: 2012-03-09 16:42
taojie2000 发表于 2011-07-15 14:26
回复 8# weiweiabc109


3Qs
作者: leeyc    时间: 2012-03-10 22:11
用semanage关闭ftp模块即可。。centos6和5的selinux策略不同了,关闭模块的方法也不同了。
#semanage module -m --disable ftp
这个可以立即生效

另外的方法呢,也可以把/etc/selinux/targeted/modules/active/modules/ftp.pp文件移走,然后重启机器生效。

如果第一个方法提示有关联模块而无法关闭的时候,可以用第二种方法关闭。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2