You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# SFTP-only chroot configuration# Applied to all members of the sftponly groupMatchGroupsftponlyForceCommandinternal-sftpChrootDirectory/srv/www/sites/%uAllowTcpForwardingnoX11ForwardingnoPermitTunnelnoPermitTTYnoAllowAgentForwardingno
Selinux policy
allow-sftp.selinux.te
module allow-sftp.selinux 1.0;
require {
type sshd_session_t;
type httpd_sys_content_t;
class dir { getattr search };
class file { open read };
}
#============= sshd_session_t ==============
allow sshd_session_t httpd_sys_content_t:dir search;
allow sshd_session_t httpd_sys_content_t:dir getattr;
allow sshd_session_t httpd_sys_content_t:file { open read };
allow-sftp.selinux.fc
# File contexts for the allow-sftp SELinux module.
#
# This module assumes an SELinux equivalence rule maps /srv/www/sites to
# /var/www/sites. Keep the canonical policy paths under /var/www/sites so the
# existing equivalence policy continues to work.
#
# Per-user SSH material inside the chroot.
/var/www/sites/[^/]+/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0)
# Published static site content.
/var/www/sites/[^/]+/html(/.*)? gen_context(system_u:object_r:httpd_sys_content_t,s0)