Score:0

Permission denied? when I set permissions for a file only for groups , what step am I missing

cn flag

I have set so that only groups can read and write.

I have made a file in /home/alice (Alice is part of red).

Bob is also part of group red.

When I cd into the /home/alice/file1 with Bob, I can see the file.

But I get permission denied when I run: cat file1

Is there a step I am missing to allow groups to read/write. The permissions are good and Alice and Bob are part of the same group.

Artur Meinild avatar
vn flag
Please provide the results of these commands in your post: `groups Alice`, `groups Bob` and `stat /home/alice/file1`
pasman pasmański avatar
mx flag
Does it work for you: https://phoenixnap.com/kb/linux-file-permissions ?
Artur Meinild avatar
vn flag
Please note that capital letters matter, so it's important if the usernames are Alice/Bob or alice/bob.
Score:0
vn flag

You didn't mention if you set the group ownership of /home/alice/file1 to red. To do this, run:

sudo chown alice:red /home/alice/file1

And view the permissions and ownership with:

stat /home/alice/file1 | grep 'Access'
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.