1

The sftp users of my server are chrooted together in a specific directory. They all belong to the group sftponly.

The rights are ok, including a special right to prevent users from overwriting others' files.

Now inside the chroot directory, I would like some subdirectories to be viewable only by some users. So I have created a dedicated group and a test directory:

# pw groupadd vip_only

# mkdir my_test_directory
# chgrp -R vip_only my_test_directory

# ls -alGh
drwxrwx--T    2 root  vip_only    512B  4 mar 21:32 my_test_directory

But my_test_directory can be viewed by any user not belonging to vip_only.

Precisely, it shows up in the directory's list in filezilla as well as in ls output when connecting with sftp. Users can't list its content, can't rename it or whatever, but they do see it in the list. How to prevent this subdirectory to show up in the main directory's list?

0

1 Answer 1

3

The standard unix-style file permissions used by sftp does not support the thing you are looking for.

1
  • Though there are other ways to do it, e.g. ACLs.
    – Bob
    Mar 5, 2016 at 1:59

You must log in to answer this question.

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