This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1288754 - SELinux is preventing sshd from 'read' accesses on the file authorized_keys.
SELinux is preventing sshd from 'read' accesses on the file authorized_keys.
Status: CLOSED DUPLICATE of bug 871065
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:e090288c6bf62cfaf60e0df0908...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-05 15:54 EST by researchiteng
Modified: 2015-12-07 04:54 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 04:54:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description researchiteng 2015-12-05 15:54:46 EST
Description of problem:
SELinux is preventing sshd from 'read' accesses on the file authorized_keys.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow sshd to have read access on the authorized_keys file
Then you need to change the label on authorized_keys
Do
# semanage fcontext -a -t FILE_TYPE 'authorized_keys'
where FILE_TYPE is one of the following: NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_tmp_t, abrt_etc_t, abrt_helper_exec_t, abrt_tmp_t, abrt_upload_watch_tmp_t, abrt_var_cache_t, abrt_var_run_t, admin_crontab_tmp_t, afs_cache_t, afs_config_t, aiccu_etc_t, alsa_etc_rw_t, alsa_home_t, alsa_tmp_t, amanda_tmp_t, antivirus_conf_t, antivirus_home_t, antivirus_tmp_t, apcupsd_tmp_t, apmd_tmp_t, arpwatch_tmp_t, asterisk_etc_t, asterisk_tmp_t, audio_home_t, auditadm_sudo_tmp_t, auth_cache_t, auth_home_t, automount_tmp_t, awstats_tmp_t, bacula_tmp_t, bin_t, bitlbee_conf_t, bitlbee_tmp_t, blueman_tmp_t, bluetooth_conf_t, bluetooth_helper_tmp_t, bluetooth_helper_tmpfs_t, bluetooth_tmp_t, boinc_project_tmp_t, boinc_tmp_t, boot_t, bootloader_etc_t, bootloader_tmp_t, bugzilla_tmp_t, cache_home_t, cardmgr_dev_t, ccs_tmp_t, cdcc_tmp_t, cert_t, cgconfig_etc_t, cgroup_t, cgrules_etc_t, chkpwd_exec_t, chrome_sandbox_home_t, chrome_sandbox_tmp_t, cinder_api_tmp_t, cinder_backup_tmp_t, cinder_scheduler_tmp_t, cinder_volume_tmp_t, cloud_init_tmp_t, cluster_conf_t, cluster_tmp_t, cluster_var_lib_t, cluster_var_run_t, cobbler_etc_t, cobbler_tmp_t, cockpit_tmp_t, collectd_script_tmp_t, colord_tmp_t, comsat_tmp_t, condor_conf_t, condor_master_tmp_t, condor_schedd_tmp_t, condor_startd_tmp_t, condor_var_lib_t, config_home_t, conman_tmp_t, couchdb_conf_t, couchdb_tmp_t, courier_etc_t, cpu_online_t, cpucontrol_conf_t, crack_db_t, crack_tmp_t, crond_tmp_t, crontab_tmp_t, ctdbd_tmp_t, cups_pdf_tmp_t, cupsd_etc_t, cupsd_lpd_tmp_t, cupsd_rw_etc_t, cupsd_tmp_t, cvs_home_t, cvs_tmp_t, cyphesis_tmp_t, cyrus_tmp_t, data_home_t, dbadm_sudo_tmp_t, dbskkd_tmp_t, dbus_home_t, dbusd_etc_t, dcc_client_tmp_t, dcc_dbclean_tmp_t, dccd_tmp_t, dccifd_tmp_t, dccm_tmp_t, ddclient_etc_t, ddclient_tmp_t, default_context_t, deltacloudd_tmp_t, devicekit_tmp_t, dhcp_etc_t, dhcpc_tmp_t, dhcpd_tmp_t, dictd_etc_t, dirsrv_tmp_t, dirsrvadmin_tmp_t, disk_munin_plugin_tmp_t, dkim_milter_tmp_t, dnsmasq_etc_t, dnssec_trigger_tmp_t, docker_config_t, docker_home_t, docker_tmp_t, dovecot_auth_tmp_t, dovecot_deliver_tmp_t, dovecot_etc_t, dovecot_tmp_t, drbd_tmp_t, ecryptfs_t, etc_mail_t, etc_runtime_t, etc_t, exim_tmp_t, exports_t, fail2ban_tmp_t, fail2ban_var_lib_t, faillog_t, fenced_tmp_t, fetchmail_etc_t, fetchmail_home_t, file_context_t, fingerd_etc_t, firewalld_etc_rw_t, firewalld_tmp_t, firewallgui_tmp_t, firstboot_etc_t, fonts_cache_t, fonts_t, fsadm_tmp_t, fsdaemon_tmp_t, ftpd_etc_t, ftpd_tmp_t, ftpdctl_tmp_t, fusermount_exec_t, games_tmp_t, games_tmpfs_t, gconf_etc_t, gconf_home_t, gconf_tmp_t, gdomap_conf_t, geoclue_tmp_t, getty_etc_t, getty_tmp_t, git_script_tmp_t, git_user_content_t, gitosis_var_lib_t, gkeyringd_exec_t, gkeyringd_gnome_home_t, gkeyringd_tmp_t, glance_registry_tmp_t, glance_tmp_t, glusterd_tmp_t, gnome_home_t, gpg_agent_tmp_t, gpg_pinentry_tmp_t, gpg_pinentry_tmpfs_t, gpg_secret_t, gpm_conf_t, gpm_tmp_t, gssd_tmp_t, gstreamer_home_t, hddtemp_etc_t, home_bin_t, home_cert_t, hostname_etc_t, hsqldb_tmp_t, httpd_config_t, httpd_php_tmp_t, httpd_suexec_tmp_t, httpd_tmp_t, httpd_user_content_t, httpd_user_htaccess_t, httpd_user_ra_content_t, httpd_user_rw_content_t, httpd_user_script_exec_t, icc_data_home_t, iceauth_home_t, inetd_child_tmp_t, inetd_tmp_t, init_tmp_t, initrc_tmp_t, initrc_var_run_t, innd_etc_t, ipsec_tmp_t, iptables_tmp_t, irc_conf_t, irc_home_t, irc_tmp_t, irssi_etc_t, irssi_home_t, iscsi_tmp_t, jetty_tmp_t, kadmind_tmp_t, kdbusfs_t, kdump_etc_t, kdumpctl_tmp_t, kdumpgui_tmp_t, keystone_tmp_t, kismet_home_t, kismet_tmp_t, kismet_tmpfs_t, klogd_tmp_t, kmscon_conf_t, krb5_conf_t, krb5_home_t, krb5_host_rcache_t, krb5_keytab_t, krb5kdc_conf_t, krb5kdc_tmp_t, ktalkd_tmp_t, l2tp_conf_t, l2tpd_tmp_t, lastlog_t, ld_so_cache_t, ld_so_t, ldconfig_tmp_t, lib_t, likewise_etc_t, lircd_etc_t, livecd_tmp_t, local_login_home_t, locale_t, login_exec_t, logrotate_mail_tmp_t, logrotate_tmp_t, logwatch_mail_tmp_t, logwatch_tmp_t, lpd_tmp_t, lpr_tmp_t, lsassd_tmp_t, lsmd_plugin_tmp_t, lvm_etc_t, lvm_exec_t, lvm_tmp_t, machineid_t, mail_home_rw_t, mail_home_t, mail_munin_plugin_tmp_t, mailman_cgi_tmp_t, mailman_mail_tmp_t, mailman_queue_tmp_t, man_cache_t, man_t, mandb_cache_t, mandb_home_t, mcelog_etc_t, mdadm_conf_t, mdadm_tmp_t, mediawiki_tmp_t, minidlna_conf_t, minissdpd_conf_t, mock_etc_t, mock_tmp_t, modules_conf_t, mojomojo_tmp_t, mongod_tmp_t, mount_ecryptfs_exec_t, mount_exec_t, mount_tmp_t, mozilla_conf_t, mozilla_home_t, mozilla_plugin_tmp_t, mozilla_plugin_tmpfs_t, mozilla_tmp_t, mozilla_tmpfs_t, mpd_etc_t, mpd_home_t, mpd_tmp_t, mpd_user_data_t, mplayer_etc_t, mplayer_home_t, mplayer_tmpfs_t, mrtg_etc_t, mscan_etc_t, mscan_tmp_t, munin_etc_t, munin_script_tmp_t, munin_tmp_t, munin_var_lib_t, mysqld_etc_t, mysqld_home_t, mysqld_tmp_t, nagios_etc_t, nagios_eventhandler_plugin_tmp_t, nagios_openshift_plugin_tmp_t, nagios_system_plugin_tmp_t, nagios_tmp_t, named_conf_t, named_tmp_t, net_conf_t, netutils_tmp_t, neutron_tmp_t, nova_tmp_t, nrpe_etc_t, nslcd_conf_t, ntop_etc_t, ntop_tmp_t, ntp_conf_t, ntpd_tmp_t, nut_conf_t, nut_upsd_tmp_t, nut_upsdrvctl_tmp_t, nut_upsmon_tmp_t, nx_server_exec_t, nx_server_home_ssh_t, nx_server_tmp_t, oddjob_mkhomedir_exec_t, openct_var_run_t, openshift_cgroup_read_tmp_t, openshift_cron_tmp_t, openshift_initrc_tmp_t, openshift_tmp_t, openshift_var_lib_t, openvpn_etc_rw_t, openvpn_etc_t, openvpn_tmp_t, openvswitch_rw_t, openvswitch_tmp_t, openwsman_tmp_t, pads_config_t, pam_timestamp_exec_t, pam_timestamp_tmp_t, pam_var_run_t, passenger_tmp_t, passwd_exec_t, passwd_file_t, pcp_tmp_t, pcscd_var_run_t, pdns_conf_t, pegasus_conf_t, pegasus_openlmi_storage_tmp_t, pegasus_tmp_t, pingd_etc_t, piranha_etc_rw_t, piranha_web_conf_t, piranha_web_tmp_t, pkcs_slotd_tmp_t, pki_tomcat_tmp_t, podsleuth_tmp_t, podsleuth_tmpfs_t, policykit_tmp_t, polipo_cache_home_t, polipo_config_home_t, polipo_etc_t, portmap_tmp_t, portreserve_etc_t, postfix_bounce_tmp_t, postfix_cleanup_tmp_t, postfix_etc_t, postfix_local_tmp_t, postfix_map_tmp_t, postfix_pickup_tmp_t, postfix_pipe_tmp_t, postfix_postdrop_t, postfix_qmgr_tmp_t, postfix_smtp_tmp_t, postfix_smtpd_tmp_t, postfix_virtual_tmp_t, postgresql_etc_t, postgresql_tmp_t, postgrey_etc_t, pppd_etc_t, pppd_tmp_t, prelink_exec_t, prelink_tmp_t, prelude_correlator_config_t, prelude_lml_tmp_t, printconf_t, proc_t, procmail_home_t, procmail_tmp_t, prosody_tmp_t, psad_etc_t, psad_tmp_t, ptal_etc_t, pulseaudio_home_t, pulseaudio_tmpfs_t, puppet_etc_t, puppet_tmp_t, puppetmaster_tmp_t, qmail_etc_t, qpidd_tmp_t, racoon_tmp_t, radiusd_etc_t, radvd_etc_t, realmd_tmp_t, rhev_agentd_tmp_t, rhnsd_conf_t, rhsmcertd_tmp_t, ricci_tmp_t, rlogind_home_t, rlogind_tmp_t, rolekit_tmp_t, rpcbind_tmp_t, rpm_script_tmp_t, rpm_tmp_t, rssh_exec_t, rssh_ro_t, rssh_rw_t, rsync_data_t, rsync_etc_t, rsync_tmp_t, rtas_errd_tmp_t, samba_etc_t, samba_net_tmp_t, samba_var_t, sandbox_file_t, sanlock_conf_t, sblim_tmp_t, screen_exec_t, screen_home_t, secadm_sudo_tmp_t, sectool_tmp_t, security_t, selinux_config_t, selinux_login_config_t, selinux_munin_plugin_tmp_t, semanage_tmp_t, sendmail_tmp_t, services_munin_plugin_tmp_t, session_dbusd_tmp_t, setroubleshoot_tmp_t, sge_tmp_t, shell_exec_t, shorewall_etc_t, shorewall_tmp_t, slapd_etc_t, slapd_tmp_t, smbd_tmp_t, smoltclient_tmp_t, smsd_tmp_t, snapperd_conf_t, snort_etc_t, snort_tmp_t, sosreport_tmp_t, soundd_etc_t, soundd_tmp_t, spamc_home_t, spamc_tmp_t, spamd_etc_t, spamd_tmp_t, speech-dispatcher_home_t, speech-dispatcher_tmp_t, squid_conf_t, squid_tmp_t, squirrelmail_spool_t, src_t, ssh_agent_exec_t, ssh_agent_tmp_t, ssh_home_t, ssh_keygen_tmp_t, ssh_tmpfs_t, sshd_exec_t, sshd_key_t, sshd_keytab_t, sshd_var_run_t, sslh_config_t, sssd_conf_t, sssd_public_t, sssd_var_lib_t, staff_sudo_tmp_t, stapserver_tmp_t, stunnel_etc_t, stunnel_tmp_t, svc_conf_t, svirt_home_t, svirt_tmp_t, svnserve_tmp_t, swat_tmp_t, swift_tmp_t, sysadm_passwd_tmp_t, sysadm_sudo_tmp_t, sysfs_t, syslog_conf_t, syslogd_tmp_t, system_conf_t, system_cronjob_tmp_t, system_db_t, system_dbusd_tmp_t, system_dbusd_var_lib_t, system_mail_tmp_t, system_munin_plugin_tmp_t, systemd_home_t, systemd_logind_sessions_t, systemd_logind_var_run_t, systemd_passwd_agent_exec_t, systemd_passwd_var_run_t, systemd_systemctl_exec_t, tcpd_tmp_t, telepathy_cache_home_t, telepathy_data_home_t, telepathy_gabble_cache_home_t, telepathy_gabble_tmp_t, telepathy_idle_tmp_t, telepathy_logger_cache_home_t, telepathy_logger_data_home_t, telepathy_logger_tmp_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_data_home_t, telepathy_mission_control_home_t, telepathy_mission_control_tmp_t, telepathy_msn_tmp_t, telepathy_salut_tmp_t, telepathy_sofiasip_tmp_t, telepathy_stream_engine_tmp_t, telepathy_sunshine_home_t, telepathy_sunshine_tmp_t, telnetd_tmp_t, tetex_data_t, texlive_home_t, textrel_shlib_t, tftpd_etc_t, tgtd_tmp_t, thumb_home_t, thumb_tmp_t, tmp_t, tomcat_tmp_t, tor_etc_t, tuned_etc_t, tuned_rw_etc_t, tuned_tmp_t, tvtime_home_t, tvtime_tmp_t, tvtime_tmpfs_t, udev_etc_t, udev_tmp_t, ulogd_etc_t, uml_ro_t, uml_rw_t, uml_tmp_t, uml_tmpfs_t, unconfined_munin_plugin_tmp_t, update_modules_tmp_t, updpwd_exec_t, user_cron_spool_t, user_fonts_cache_t, user_fonts_config_t, user_fonts_t, user_home_t, user_mail_tmp_t, user_tmp_t, userhelper_conf_t, usr_t, uucpd_tmp_t, var_auth_t, var_spool_t, varnishd_etc_t, varnishd_tmp_t, virt_content_t, virt_etc_t, virt_home_t, virt_qemu_ga_tmp_t, virt_tmp_t, vmtools_tmp_t, vmware_conf_t, vmware_file_t, vmware_host_tmp_t, vmware_sys_conf_t, vmware_tmp_t, vmware_tmpfs_t, vpnc_tmp_t, w3c_validator_tmp_t, webadm_tmp_t, webalizer_etc_t, webalizer_tmp_t, wine_home_t, wireshark_home_t, wireshark_tmp_t, wireshark_tmpfs_t, wtmp_t, xauth_exec_t, xauth_home_t, xauth_tmp_t, xdm_etc_t, xdm_home_t, xdm_rw_etc_t, xend_tmp_t, xenstored_tmp_t, xserver_etc_t, xserver_tmpfs_t, ypbind_tmp_t, ypserv_conf_t, ypserv_tmp_t, zabbix_tmp_t, zarafa_deliver_tmp_t, zarafa_etc_t, zarafa_indexer_tmp_t, zarafa_server_tmp_t, zarafa_var_lib_t, zebra_conf_t, zebra_tmp_t. 
Then execute: 
restorecon -v 'authorized_keys'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that sshd should be allowed read access on the authorized_keys 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:sshd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:default_t:s0
Target Objects                authorized_keys [ file ]
Source                        sshd
Source Path                   sshd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-155.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.5-300.fc23.x86_64 #1 SMP Tue
                              Oct 27 04:29:56 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-11-28 23:27:59 EET
Last Seen                     2015-11-28 23:28:37 EET
Local ID                      75d0db12-5a90-4fb8-911a-ebddcaf30a65

Raw Audit Messages
type=AVC msg=audit(1448746117.462:396): avc:  denied  { read } for  pid=27364 comm="sshd" name="authorized_keys" dev="dm-0" ino=1073737 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:default_t:s0 tclass=file permissive=0


Hash: sshd,sshd_t,default_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-155.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.6-301.fc23.x86_64
type:           libreport

Potential duplicate: bug 871065
Comment 1 Petr Lautrbach 2015-12-07 04:54:37 EST
Your authorized_keys file seems to be mislabelled. Please run the following command to fix it:

    restorecon -v PATHTO/authorized_keys

*** This bug has been marked as a duplicate of bug 871065 ***

Note You need to log in before you can comment on or make changes to this bug.