温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何解决SELinux拒绝vsftpd上传文件到用户主目录的问题

发布时间:2021-10-25 16:28:51 来源:亿速云 阅读:203 作者:小新 栏目:系统运维

这篇文章将为大家详细讲解有关如何解决SELinux拒绝vsftpd上传文件到用户主目录的问题,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

用惯了vsftpd,觉得vsftpd非常实用而且安全,但是那些初学者经常会遇到一些问题如下:

系统是CentOS 5.1,创建用户后,不能登陆FTP,在/var/log/messages文件记录以下信息:

Mar 31 13:46:15 localhost kernel: audit(1206942375.697:5719): avc: denied { append } for pid=32111 comm="vsftpd" name="test" dev=sda3 ino=19400200 scontext=root:system_r:ftpd_t:s0 tcontext=root:object_r:root_t:s0 tclass=file

SELinux ftp daemon policy is customizable based on least access required. So by default SElinux does not allow users to login and read their home directories.

If you are setting up this machine as a ftpd server and wish to allow users to access their home directorories, you need to set the ftp_home_dir boolean.

执行命令:

setsebool -P ftp_home_dir 1

上传文件成功。

关于“如何解决SELinux拒绝vsftpd上传文件到用户主目录的问题”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI