Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have created a dummy file just to test out group permissions.

touch /path/test.txt
chown user1:txtwriter /path/test.txt
chmod 664 /path/test.txt && ls -la

returns:

-rw-rw-r--   1 user1  txtwriter         0 Mar 23 14:59 test.txt

and with user2 which is added to txtwriter group:

[user2@localhost (/path)]: echo blah > test.txt 
-bash: test.txt: Permission denied

How can I fix the permissions so all of the users added to the group can modify the file ?

share|improve this question
1  
Are you sure the group change has permeated to the current shell? Try the command groups with user2 to see if the group is listed. If not, run newgrp txtwriter in the current terminal, then try writing to the file again. If this was the problem, look up the definition of "login shell". –  Daniel Andersson Mar 23 '12 at 12:35
    
the group is listed –  Teneff Mar 23 '12 at 12:52
    
It seems to be working fine after logout and login again. –  Teneff Mar 23 '12 at 13:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.