Score:0

User not able to modify the file which is created by a different user. User is also part of that user's group

wf flag

I have created two normal users on my Ubuntu system:

testuser1 testuser2

I have added testuser2 to the testuser1 group

testuser1 created a file in the /tmp folder named file1, testuser2 is able to read the file1 but not edit it. What could be the possible reason?

The root user is also able to read file1 but not edit it.

I have run the command ls -l /tmp/file1

and get the output : -rw-rw-r-- 1 testuser1 testuser1 6 Aug 29 22:19 /tmp/file1

That means the group have the read and write permissions still enduser2 is not able to edit file1

I also run the command umask for both of user and got 002.

Kindly help me in resolving this issue.

cc flag
Does this answer your question? [User root can't write to file in /tmp owned by someone else in 20.04, but can in 18.04](https://askubuntu.com/questions/1250974/user-root-cant-write-to-file-in-tmp-owned-by-someone-else-in-20-04-but-can-in) A default security feature since 18.04.
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.