0

I'm running CentOS 6.9.

I'd like to add SFTP users that can access certain directories. For one of them, I'd like them to be able to access everything (with SFTP permissions only and no shell access).

So far I added them:

adduser username
passwd username

... entered password.

Then I edited /etc/ssh/sshd_config:

Match User username
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no

Now, all the other instructions I see are to use chown for this user. BUT, I don't want to change ownership of the entire directory to this user. I just want this user to be able to access the entire directory without affecting the ownership permissions of any other users.

How can I do this?

  • Research ACL; e.g., setfacl. – G-Man Mar 1 at 18:15
  • @G-Man Looked into that. The documentation isn't really clear. Could you explain how to use that for my purposes? – Best Dev Tutorials Mar 1 at 18:49
  • @Christopher so would setfacl -Rdm u:username:rwx / provide full permissions for that user? Thanks – Best Dev Tutorials Mar 1 at 18:57
  • @Christopher Thank you!. You're right combining them didn't work but the 2 separate commands did – Best Dev Tutorials Mar 1 at 19:16
  • @Christopher This just cause a error 500 on all of my sites!! – Best Dev Tutorials Mar 1 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.