Algemon
01-12-2001, 06:54 PM
I don't understand what I am doing wrong here.
If I make a file as root using vi called /root/test.test, and chmod it so that it read and writable by root and readable by group (# chown o-rw test.test).
Then I created a new group called peck (# groupadd peck).
Then I added user algemon to the group peck (# gpasswd -a algemon peck).
Then as algemon, I listed the file as follows: $ ls -al /root/test.test
-rw-r----- 1 root peck 22 Jan 13 18:33 /root/test.test
Then if I try and cat the file it won't let me as user algemon: $ cat /root/test.test
cat: /root/test.test: Permission denied
I just don't understand that, algemon belongs to the group peck as I checked in /etc/group (# cat /etc/group) shows:
peck:x:1001:algemon
If on the other hand I chown the test.test file to group algemon then user algemon can cat the file.
Why is that?
I am running Debian 2.2 Potato if that is important.
[This message has been edited by Algemon (edited 12 January 2001).]
If I make a file as root using vi called /root/test.test, and chmod it so that it read and writable by root and readable by group (# chown o-rw test.test).
Then I created a new group called peck (# groupadd peck).
Then I added user algemon to the group peck (# gpasswd -a algemon peck).
Then as algemon, I listed the file as follows: $ ls -al /root/test.test
-rw-r----- 1 root peck 22 Jan 13 18:33 /root/test.test
Then if I try and cat the file it won't let me as user algemon: $ cat /root/test.test
cat: /root/test.test: Permission denied
I just don't understand that, algemon belongs to the group peck as I checked in /etc/group (# cat /etc/group) shows:
peck:x:1001:algemon
If on the other hand I chown the test.test file to group algemon then user algemon can cat the file.
Why is that?
I am running Debian 2.2 Potato if that is important.
[This message has been edited by Algemon (edited 12 January 2001).]