I developed a vsftp server with three user groups: g1, g2, g3. Each group has a folder with its name. For example.


Each group also has users

sudo useradd -g g1 u1
sudo useradd -g g1 u2
sudo useradd -g g2 u3
sudo useradd -g g2 u4
sudo useradd -g g3 u5

Users in group 1 can only access the folders in group 1 Users in group 2 can only access the folders in group 2 Users in Group 3 can access the folders of all groups.

Users in Group 1 can not delete folders that do not belong to them. Example: u1 tries to delete the u2 folder located at home/server/g1/u2.

Which command should I use to get this type of permission?

Only users in Group 3 can delete the folders in the other groups. Example: u5 can delete the home/server/g2/u4 folder.

To get these permissions I used the following commands.

sudo chown -c -R g3 home/server/g1
sudo chown -c -R g3 home/server/g2

But it did not work either.

Which parameters should I use in the chown command to get the required permissions? Would not the -c parameter be usefulfor that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.