| Summary: | SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory /home/kelvan. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Kelvan <spam42> |
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | dominick.grift, dwalsh, mgrepl |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | setroubleshoot_trace_hash:6ae97ba82d917a49e28603a054c22f1ef38cc7fc85edc1408eea7c02c4ab60a2 | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-09 07:43:38 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Migrating to Fedora from another distro or sharing your partition mounted on /home with another distro? it you are migrating to Fedora: yum install polictcoreutils-restorecond relogin to you session restorecon -R -v /home if you are sharing your /home partition with other distros: You need to additionally run restorecon -R -v /home each time you boot into fedora. |
SELinux is preventing /usr/sbin/sshd from 'search' accesses on the directory /home/kelvan. ***** Plugin restorecon (82.4 confidence) suggests ************************* If you want to fix the label. /home/kelvan default label should be user_home_dir_t. Then you can run restorecon. Do # /sbin/restorecon -v /home/kelvan ***** Plugin file (7.05 confidence) suggests ******************************* If you think this is caused by a badly mislabeled machine. Then you need to fully relabel. Do touch /.autorelabel; reboot ***** Plugin file (7.05 confidence) suggests ******************************* If you think this is caused by a badly mislabeled machine. Then you need to fully relabel. Do touch /.autorelabel; reboot ***** Plugin catchall_labels (4.59 confidence) suggests ******************** If you want to allow sshd to have search access on the kelvan directory Then you need to change the label on /home/kelvan Do # semanage fcontext -a -t FILE_TYPE '/home/kelvan' where FILE_TYPE is one of the following: user_home_dir_t, tmp_t, tmp_t, usr_t, usr_t, var_t, var_t, var_t, admin_home_t, default_context_t, winbind_var_run_t, mail_spool_t, autofs_t, device_t, device_t, devpts_t, locale_t, var_auth_t, sssd_public_t, etc_t, etc_t, proc_t, proc_t, sysfs_t, tmpfs_t, user_home_dir_t, likewise_var_lib_t, textrel_shlib_t, crack_db_t, user_tmp_t, ssh_home_t, krb5_conf_t, auth_cache_t, rpm_script_tmp_t, security_t, security_t, nx_server_var_lib_t, ssh_home_t, var_spool_t, default_t, nx_server_home_ssh_t, sosreport_tmp_t, proc_afs_t, rpm_tmp_t, dbusd_etc_t, user_home_t, var_lib_t, var_lib_t, var_run_t, var_run_t, configfile, domain, faillog_t, proc_net_t, rpm_log_t, rssh_ro_t, var_log_t, var_log_t, samba_var_t, amanda_var_lib_t, avahi_var_run_t, pam_var_run_t, net_conf_t, openct_var_run_t, sysctl_kernel_t, abrt_var_run_t, home_root_t, nscd_var_run_t, nslcd_var_run_t, pcscd_var_run_t, sssd_var_lib_t, sysctl_crypto_t, home_root_t, httpd_sys_content_t, gitosis_var_lib_t, sshd_tmpfs_t, setrans_var_run_t, admin_home_t, system_dbusd_var_lib_t, system_dbusd_var_run_t, rlogind_home_t, cgroup_t, selinux_config_t, sysctl_t, sysctl_t, abrt_t, bin_t, bin_t, cert_t, lib_t, mnt_t, root_t, sshd_t, tmp_t, var_t, var_t, var_t, default_context_t, device_t, etc_t, etc_t, sysfs_t, tmpfs_t, security_t, var_lib_t, var_run_t, var_run_t, var_run_t, net_conf_t, file_context_t, dirsrv_var_run_t, bin_t, nscd_var_run_t, pcscd_var_run_t, slapd_var_run_t, cgroup_t, selinux_config_t, cert_t, root_t. Then execute: restorecon -v '/home/kelvan' ***** Plugin catchall (1.31 confidence) suggests *************************** If you believe that sshd should be allowed search access on the kelvan directory 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:sshd_t:s0-s0:c0.c1023 Target Context system_u:object_r:file_t:s0 Target Objects /home/kelvan [ dir ] Source sshd Source Path /usr/sbin/sshd Port <Unknown> Host (removed) Source RPM Packages openssh-server-5.6p1-31.fc15.1 Target RPM Packages Policy RPM selinux-policy-3.9.16-26.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Permissive Host Name (removed) Platform Linux (removed) 2.6.38.7-30.fc15.x86_64 #1 SMP Fri May 27 05:15:53 UTC 2011 x86_64 x86_64 Alert Count 8 First Seen Thu 09 Jun 2011 01:05:10 CEST Last Seen Thu 09 Jun 2011 01:11:02 CEST Local ID ba9e65ae-51ac-4798-9536-79b7cd216803 Raw Audit Messages type=AVC msg=audit(1307574662.935:177): avc: denied { search } for pid=2758 comm="sshd" name="kelvan" dev=sda5 ino=262145 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=dir type=SYSCALL msg=audit(1307574662.935:177): arch=x86_64 syscall=chdir success=yes exit=0 a0=7fb2cfe51570 a1=7fb2ce766e80 a2=9 a3=0 items=0 ppid=2757 pid=2758 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=5 comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null) Hash: sshd,sshd_t,file_t,dir,search audit2allow #============= sshd_t ============== allow sshd_t file_t:dir search; audit2allow -R #============= sshd_t ============== allow sshd_t file_t:dir search;