# groupadd www_user
# useradd -g www_user -G apache -d /var/www -s /sbin/nologin www_user
# passwd www_user
# chown root:root /var/www
# cd /var/www
# chown -R www_user:apache html
# cd /var/www
# chmod -R 775 html
# vi /etc/ssh/sshd_config
#Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match User www_user PasswordAuthentication yes ChrootDirectory /var/www X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp -u 002 |
Match User id* PasswordAuthentication yes ChrootDirectory /var/www/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp -u 002 |
# /usr/sbin/sshd -t
# systemctl restart sshd.service
# vi /etc/ssh/sshd_config
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
# systemctl restart sshd.service
# vi /etc/ssh/sshd_config
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsa
# systemctl restart sshd.service
# useradd (userid)
[sss_cache] [sysdb_domain_cache_connect] (0x0010): DB version too old [0.23], expected [0.24] for domain implicit_files!
Higher version of database is expected!
In order to upgrade the database, you must run SSSD.
Removing cache files in /var/lib/sss/db should fix the issue, but note that removing cache files will also remove all of your cached credentials.
Could not open available domains
[sss_cache] [sysdb_domain_cache_connect] (0x0010): DB version too old [0.23], expected [0.24] for domain implicit_files!
Higher version of database is expected!
In order to upgrade the database, you must run SSSD.
Removing cache files in /var/lib/sss/db should fix the issue, but note that removing cache files will also remove all of your cached credentials.
Could not open available domains
# cd /var/lib/sss/db/
# systemctl stop sssd.service
# rm -f *
# systemctl start sssd.service