LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   group permission problems (https://www.linuxquestions.org/questions/linux-general-1/group-permission-problems-472099/)

ichi 08-08-2006 05:25 PM

group permission problems
 
I'm having some problems with group permissions. For some reason they just don't seem to work.

The way I understand it is that if a user is a member of a group and that file is owned by that group, the group permissions of that file affects the user. But it just doesn't.

For example, a file named fish:

ls -l fish
----rwx--- 1 ichi games 8 Aug 8 23:06 fish

Group permissions are read, write and execute, so I should be able to read it, alter it, and execute if it's executable, if my user is a members of the games group. Which I am:

cat /etc/group | grep ichi
games:x:35:ichi

groups
wheel audio cdrom video games usb users portage

So I'm definately in the group. Yet when I try to read it:

cat fish
cat: fish: Permission denied

Does anyone know why this might happen?

Thanks in advance.

jschiwal 08-08-2006 05:46 PM

You're also the owner of the file. Change the mode to 0770.

ichi 08-08-2006 05:52 PM

So if I'm the owner of a file as well as in the file's group, only owner permissions affect?

jschiwal 08-09-2006 03:52 AM

Yes. Since you own the file, you could change the permissions. Also, if you have write permissions on the directory , you could delete it.

ichi 08-09-2006 07:59 AM

OK, thank you :)

PingFloyd 08-10-2006 11:01 AM

Why do you had it set up that the owner doesn't have permissions but the group does?

I can't think of any reasons for why to do things that way so you have me curious now.

ichi 08-10-2006 11:29 AM

To serve as an example, to test my theory :p


All times are GMT -5. The time now is 06:48 PM.