On Ubuntu, I want user1 to be able to read/write/execute/delete all files/folders of user2
I have placed them under the same group but that doesn't seem to do it,
What is the correct way of approaching this?
You need to assign the group they are both in to all files of user 2.
Then you need the group permissions to have rwx so:
Where somefile is a file of user2
Putting both users in the same group is not enough: by default, files are not group-writable unless explictly made so (with
A way that will work most of the time is to use access control lists. First, make sure that the filesystem containing user2's home directory is mounted with the
If user2 keeps files outside his home directory, apply this command to the other directories as well.
Finally, giving user1 this direct access may not be the best method to solve the underlying problem. It may be more reasonable to give user2 access only to the files that actually need to be shared (either using a common group or using ACLs). Consider also giving user2 the permission to run programs as user1 through sudo (run
User1 must be a member of the group that is assigned to the group that has rwx (7, as in whatever for the user and other permission, but a 7 listed for the group permission).
Does this help?