3

I have set up my machine so that my group "sftponly" can access the users home folder. But right now, the users in the group don't have permission to other folders, but they have permission to see them.

How can I change this so that the users in the group only can see their home folder?

My OS is Ubuntu, this is in my /etc/ssh/sshd_config:

Match Group sftponly
    ChrootDirectory %h
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp

Right now, it looks like this when a user connects with SFTP:

What it is now Right now they can see all folders, but I only want them to be in the folder they start in, so they can't go up in the folders and see the other users' home folders.

13
  • 2
    Can you please provide the question with an example (current & expected behaviour) ?
    – neuron
    Jul 23, 2015 at 12:24
  • @Neuron You can see it the edit. Jul 23, 2015 at 13:24
  • 1
    Reloaded the SSH server? Also, why don't you use ChrootDirectory %h so each user is chrooted in its own home directory?
    – sebix
    Jul 23, 2015 at 19:28
  • 1
    You can try this, but it will probably not work: because as you can see in sshd_config(5): All components of the pathname must be root-owned directories that are not writable by any other user or group.
    – Jakuje
    Jul 23, 2015 at 20:09
  • 1
    Could just be a typo...? You refer to group sftponly in sshd_config, but, at the beginning of your question, you specify ftponly as the group to which your users belong. Jul 23, 2015 at 21:55

1 Answer 1

0

I'd recommend using VSFTPD if you're not doing so already, and un-comment chroot_local_user=YES in vsftpd.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .