0

i have two groups

  • boys
  • girls

boys have users

  • pete
  • ali

girls have users

  • alice
  • mary

i have d1 directoy in home/pete

I want to let only pete can read and write the files in that folder,

And ali can read only

And for group grils can't read or write

i used

chmod g+u=rxw d1

And now, pete only can modify the files, and ali can read only, so the first part done

But grils group users can do what ali can, so they can read the files

How can i exclude girls group ?

1
  • i used chmod 640 test.txt but, users in the same group and different group can't R/W the file
    – M J
    Commented Mar 19, 2020 at 13:59

1 Answer 1

0

chown pete:boys home/pete

chmod 0750 home/pete

pete would get full control

ali would get enter & read permissions through the group 'boys'

girls wouldn't even get into the directory

1
  • Thank you so much, it worked
    – M J
    Commented Mar 19, 2020 at 14:27

You must log in to answer this question.

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