Hi, this is my first post to this forum!
I'm actually a quite experienced linux user, but I was interested in this topic because I wanted to create a /home/shared directory to put my family pictures and other things that aren't related to my user account.
The answer above isn't actually a complete solution. Setting permissions to 777 on the directory makes it possible for any user to create files, but it doesn't guarantee that all users have permissions to access new files and directory.
I want to have a shared directory for a group of users that guarantees:
- Files created by any user is readable, writable and deletable by any user
- Directories created by any user have the same property
- Only root can deny other users access to any file
I tried to use the setgid flag to force all file and directories to belong to the group, but it didn't work quite as I wanted:
- Default permissions for the active user caused new files to be not writable by the group. I want to force new files to be writable by the group, regardless of user settings.
- If a directory tree is moved/copied from the user's home dir, the GID isn't changed, making it possible for the user to add files that aren't owned by the group.
- It's still possible for the user to change the group of his files.
Is it possible to
force all files in the directory to belong to a certain group and have all the permissions flags for the group set?