Ubuntu: Restrict user FTP/SFTP access to an existing folder

Asked

Viewed 856 times

0

Consider the following situation on an UBUNTU-mounted web server:

/var/www/site 1  <-- apenas root
/var/www/site 2  <-- designer 1, root
/var/www/site 3  <-- designer 2, root
/var/www/site 4  <-- designer 1, root

Meaning that the user root has access to all folders, designer 1 accesses the folders /site 2 and /site 4 and designer 2 accesses only the folder /site 3.

Currently, folders already exist and are accessed by root usually, only now designers need to have access to specific folders of the projects they work with.

How do I create new users that can access specific folders existing server?

Note that there is no problem if you have to create a user for each folder to be restricted. In this case and considering the above example, the designer 1 would have the access data to both folders: /site 2 and /site 4. As long as each one has access to their projects, but not those of the other collaborators, it’s all right.

  • 1 tip, use an ftp server such as proftpd. If you want to use sftp you should work with groups of users, the administration is a little more complex than using an ftp server as mentioned above.

  • The hint would be good, but it is not feasible to use an FTP server. If it was, I would not have asked the question.

  • Then create user groups by giving permissions by the group. Ex: Group 1 has permission in directories site 2 and website 4 Group 2 has permission in directories website 3 and site 1 group 1, it will have permissions in group 1 directories. Just add users, creating groups as your need.

  • @Alessandroschneider, yes, exactly that, but I already knew. I did not ask the question because there could be another solution, and I did not want to direct or restrict the answer. Anyway, I am asking just how to do, ie what commands. If you know, please answer the question.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.