共計(jì) 818 個(gè)字符,預(yù)計(jì)需要花費(fèi) 3 分鐘才能閱讀完成。
自動(dòng)寫代碼機(jī)器人,免費(fèi)開通
這篇文章將為大家詳細(xì)講解有關(guān)如何解決 SELinux 拒絕 vsftpd 上傳文件到用戶主目錄的問題,丸趣 TV 小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
用慣了 vsftpd,覺得 vsftpd 非常實(shí)用而且安全,但是那些初學(xué)者經(jīng)常會(huì)遇到一些問題如下:
系統(tǒng)是 CentOS 5.1,創(chuàng)建用戶后,不能登陸 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 t >
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.
執(zhí)行命令:
setsebool -P ftp_home_dir 1
上傳文件成功。
關(guān)于“如何解決 SELinux 拒絕 vsftpd 上傳文件到用戶主目錄的問題”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯(cuò),請把它分享出去讓更多的人看到。
向 AI 問一下細(xì)節(jié)
丸趣 TV 網(wǎng) – 提供最優(yōu)質(zhì)的資源集合!