I've two user's abc & xyz and the user abc has been added to the group xyz via usermod -a -G xyz abc and here the file permission on home directory of xyz i.e /home/xyz:

drwxrwxr-x 2 xyz xyz 4096 Mar 23 16:13 xyz

Now inside home directory of xyz, there is a file testfile, now when I'm trying to delete the file testfile from user abc, I'm unable to delete the file and getting Permission Denied.

What am I missing? I've read various answers for this but didn't get anything.


There are two possibilities:

1) You need to look at the owner/group permissions of the directory containing the file or directory you try to delete as that entry will be modified if a file (or directory) within it is deleted.

2) The account (group membership) of user xyz is modified but the user is not using a new shell and therefore the new group membership is not active yet. Try id -a within the context (shell) of the user which is trying to delete the file to get the current groups

  • Thank you @Lambert for the quick response. I've already verified these two possibilities before asking question. Those are okay. I got a hit from a answer of the question superuser.com/questions/784952/… but not get the success. Can you help with that? – Shashank Agrawal Mar 23 '15 at 11:51
  • Can you also provide the ls -l output from the file you are trying to delete? In the question I can only see the directory. – Lambert Mar 23 '15 at 11:53
  • Sure, it is -rwxrwxr-- 1 xyz xyz 5 Mar 23 16:13 testfile – Shashank Agrawal Mar 23 '15 at 11:59
  • 1
    Actually, that worked after log out and re-login – Shashank Agrawal Mar 23 '15 at 12:11

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.