1
I am trying to give user full access to specific directory.
I am using SFTP on Centos 7. I am creating new group and user
groupadd ftpusers
useradd -m newuser -s /sbin/nologin -g ftpusers
chown root "directory"
chmod 750 "directory"
My sshd_config
contains:
Subsystem sftp internal-sftp
Match group ftpaccess
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
No matter what directory I put it gives me access to Home.
How can I make access to specific directory?
Please, clarify what is the question here. You specify
chrootdirectory
so the user does not have access anywhere else. If you specify different directory, he will have access to that directory. – Jakuje – 2017-06-08T07:41:38.333