centos - Selinux - File Contexts Look Good, But Selinux Won't Allow Write -
i trying learn selinux. sandbox , using vsftpd experiment with, have vsfptd server running in centos. have annonmous users place files in /var/ftp/incoming. on remote machine can have user log in not place file on remove vsftpd server:
$ftp mysql_server connected mysql_server (192.168.1.31). 220 welcome blah ftp service. name (mysql_server:root): anonymous 331 please specify password. password: 230 login successful. remote system type unix. using binary mode transfer ftp> put atd local: atd remote: atd 227 entering passive mode (192,168,1,31,19,161). 553 not create file. ftp>
on vsftpd server, aureport -a report shows:
[root@mysql_server ftp]# aureport -a avc report ======================================================== # date time comm subj syscall class permission obj event ======================================================== 4. 04/08/2013 13:30:36 vsftpd unconfined_u:system_r:ftpd_t:s0-s0:c0.c1023 21 dir write system_u:object_r:public_content_t:s0 denied 28 5. 04/08/2013 13:34:57 vsftpd unconfined_u:system_r:ftpd_t:s0-s0:c0.c1023 2 dir write system_u:object_r:public_content_t:s0 denied 47
i checked directory , file contexts good, don't understand why selinux won't allow vsftpd write incoming directory:
[root@mysql_server ftp]# ls -z drwx-wx---. root ftp system_u:object_r:public_content_t:s0 incoming drwxr-xr-x. root root system_u:object_r:public_content_t:s0 pub [root@mysql_server ftp]#
you need run following commands allow in selinux upload , edit files:
setsebool -p allow_ftpd_full_access on setsebool -p ftp_home_dir on
Comments
Post a Comment