2

I'm on a new Centos 7 setup. So far I have logged in via ssh as root:

  • added a new user
  • gave user full permission via visudo
  • added user to the root group (not sure if this is needed)

Logged out and then logged in with the new user. I had already done a few things with the root user, such as install LAMP and add the directory /var/www/public_html/test/

I am able to delete the test directory via SSH, but I am not able to use a SFTP client to do so... when I am using a SFTP client (Transmit for MAC) I get permission denied.

So my question is... how do I give my user permissions that will let me use the SFTP client to complete basic operations such as add/remove/move?

0

You need to setup the SFTP service (it's part of SSH but often times is disabled). Take a look at my answer to this U&L Q&A titled: How can I create an SFTP user in CentOS?.

The key bits are making the following changes to your SSHD setup.

Make these changes to your /etc/ssh/sshd_config file.

  Subsystem       sftp    internal-sftp

  ## You want to put only certain users (i.e users who belongs to 
  ## sftpusers group) in the chroot jail environment. Add the following
  ## lines at the end of /etc/ssh/sshd_config

  # Match Group sftpusers  
  #   ChrootDirectory /sftp/%u  
  #   ForceCommand internal-sftp

Then restart your SSHD service:

$ sudo service sshd restart
  • I will give it a try once I get home. Thanks. – gdaniel Sep 15 '14 at 18:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.