SELinux is preventing /usr/sbin/sshd from 'read' accesses on the file /etc/localtime. ***** Plugin catchall_boolean (89.3 confidence) suggests ******************* If you want to allow sftp-internal to login to local users and read/write all files on the system, governed by DAC. Then you must tell SELinux about this by enabling the 'sftpd_full_access' boolean. Do setsebool -P sftpd_full_access 1 ***** Plugin catchall (11.6 confidence) suggests *************************** If you believe that sshd should be allowed read access on the localtime file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep sshd /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:sftpd_t:s0-s0:c0.c1023 Target Context system_u:object_r:locale_t:s0 Target Objects /etc/localtime [ file ] Source sshd Source Path /usr/sbin/sshd Port <Sconosciuto> Host (removed) Source RPM Packages openssh-server-5.5p1-24.fc14.2 Target RPM Packages glibc-2.13-1 Policy RPM selinux-policy-3.9.7-42.fc14 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.35.13-92.fc14.i686 #1 SMP Sat May 21 17:39:42 UTC 2011 i686 i686 Alert Count 530 First Seen ven 01 apr 2011 16:12:20 CEST Last Seen gio 14 lug 2011 17:00:51 CEST Local ID 94de95c1-7c4f-4854-adf7-38a12dac63c3 Raw Audit Messages type=AVC msg=audit(1310655651.141:39587): avc: denied { read } for pid=21141 comm="sshd" name="localtime" dev=dm-0 ino=1707215 scontext=system_u:system_r:sftpd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:locale_t:s0 tclass=file type=SYSCALL msg=audit(1310655651.141:39587): arch=i386 syscall=open success=no exit=EACCES a0=86d907 a1=0 a2=1b6 a3=86c477 items=0 ppid=21121 pid=21141 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=241 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sftpd_t:s0-s0:c0.c1023 key=(null) Hash: sshd,sftpd_t,locale_t,file,read audit2allow #============= sftpd_t ============== #!!!! This avc can be allowed using the boolean 'sftpd_full_access' allow sftpd_t locale_t:file read; audit2allow -R #============= sftpd_t ============== #!!!! This avc can be allowed using the boolean 'sftpd_full_access' allow sftpd_t locale_t:file read;
Are you trying to get localtime file using sftpd?
Miroslav just add the following to RHEL6, F14, F15 miscfiles_read_localization(anon_sftpd_t) miscfiles_read_localization(sftpd_t)
(In reply to comment #1) > Are you trying to get localtime file using sftpd? Hi, I am using the sftp internal to ssh, in sshd_config I set: Subsystem sftp internal-sftp the bug reported above shows up when I upload with sftp a file to the server thanks Luigi
Fixed in selinux-policy-3.9.7-44.fc14
selinux-policy-3.9.7-44.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-44.fc14
Package selinux-policy-3.9.7-44.fc14: * should fix your issue, * was pushed to the Fedora 14 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.7-44.fc14' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-44.fc14 then log in and leave karma (feedback).
selinux-policy-3.9.7-44.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.