0

I created the directory "science" using mkdir science from /home/anu directory. And typed chmod 664 science.

step 2:- /home/abc/science -> created a file chemistry in it using touch chemistry and typed chmod 664 chemistry.

Step 3:- Added new user to group anu using "usermod -aG anu user1" .

Step4: Went to /home/user1 and typed rm -rf /home/anu/science/chemistry but got access denied even when i am a part of group anu.

Please can you advise.

0

2 Answers 2

2

When you create new users and adding them to new groups it's recommended to relogin under new session. Also, show rwx permission for /home/anu, /home/anu/science and /home/anu/science/chemistry. Chances are - there is an answer

1
  • I have changed the permission for /home/anu to 770 as well and it worked..thank you :) Mar 22, 2016 at 17:09
2

your folder(science) is 664 which does not allow you to rm file(chemistry) in it. Change folder to 774 and have a try

2
  • not working :( I tried changing it to 774 but still the same. Mar 22, 2016 at 17:09
  • Did the same with main folder and it worked...Thanks for the answer :) Mar 22, 2016 at 17:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.