Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create private user folders, preventing other users from reading user folder contents. #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexleach
Copy link

Proposal

Make user folders private. This prevents other FTP users and groups from reading the contents of each user's FTP folder.

Note about Parent Directories

This does not prevent an FTP user from going up a directory however, so only partially helps the issue that FTP users can go up to the parent directory and view the names of other user folders.

By removing the read permission bit from all users on the parent directory, FTP users can be prevented from seeing the contents of the parent directory. For example.

If we have two user folders:

$ ls -al /ftp
total 0
drwxr-x--x 1 root   root   34 Mar 31 09:45 .
drwxr-xr-x 1 root   root    6 Mar 30 06:43 ..
drwxr-s--- 1 user1  user1  16 Mar 31 09:50 user1
drwxr-s--- 1 user2  user2   0 Mar 31 09:45 user2

Note the r bit is missing from /ftp. This is applied with:

$ chmod o-r /ftp

It is a bit tricky to add this to the start_vsftpd.sh script, as user folders aren't necessarily saved in the same parent directory, as completely separate directories can be configured in the USERS environment variable when starting the container. Therefore, I suggest that is left as an exercise for the user, should they want to keep the names of other users and their folders private.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant