0

I have a Debian 9 server setup with vsftpd. In the main directory are 2 folders, /game and /launcher.

I have an app that is trying to access the server via ftp but the app can't read data because the user permissions are blocking my ftpuser account from reading from the main directory. How do I grant full read access to all users in 2 specific folders?

I have unlimited bandwidth and the purpose of the app is large file distribution so I need to simply allow anyone (the ftpuser) to download from the /game and /launcher folders. Currently I get 503 access errors, tried chmod -777 on the root directory and that fudged the entire server (required a reinstall) so I need some advice.

0

Use groups to give read access to ftpuser on /games and /launcher

If the user already has a default user group (normally with same name as username), simply change the group owner of the directory.

# chgrp YOUR_GROUP /game

Alternatively, create a new group which will do this for multiple users if you will (who will be given read permissions on a specific directory), as follows. However, this will create a shared directory:

# groupadd NEW_GROUP

Then add the user ftpuser to the group NEW_GROUP as follows:

# usermod -aG NEW_GROUP ftpuser     # add user to NEW_GROUP
# groups ftpuser                # check users groups

Change the group owner of the directory to YOUR_GROUP:

# chgrp NEW_GROUP /game

Now set read access for the group members:

# chmod -R 0750 /games
# ls  -l /games     #check new permissions

Repeat the last two steps for /launcher

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.