Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


-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
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


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

Browse other questions tagged or ask your own question.