0
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 ?
1Are 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, runnewgrp 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 – 2012-03-23T12:35:05.453the group is listed – Teneff – 2012-03-23T12:52:00.767
It seems to be working fine after logout and login again. – Teneff – 2012-03-23T13:00:57.480