An odd situation came up recently. User1 needed to be able to change files in a directory were the files and the directory were owned by User2 and in group User2. In order to facilitate this editing, the permissions were changed to 757 recursively for the directory structure. Thus a listing looked something like the following.
drwxr-xrwx 3 user2 user2 4096 Nov 19 19:41 . drwxr-xr-x 3 user2 user2 4096 Nov 19 19:41 .. drwxr-xrwx 3 user2 user2 4096 Nov 19 19:41 directory1 drwxr-xrwx 3 user2 user2 4096 Nov 19 19:41 directory2 drwxr-xrwx 3 user2 user2 4096 Nov 19 19:41 directory3 -rwxr-xrwx 3 user2 user2 42 Nov 19 19:41 file1
User1 was able to read the files however attempts to create new files or edit/copy over existing files failed. The error was something like the following.
$ touch file1 touch: cannot touch 'file1': Permission denied
Thinking that maybe the drive was write protected somehow, User1 asked User2 to change the file. User2 was able to do so without any issues thus indicating the drive was not write protected.
/etc/fstab, the file appeared to be on a locally mounted hard drive.
User1 is in group User2. (This was originally thought not to be the case)
There were no locks on the file.
It appeared as though SE Linux was disabled. (As indicated by
While I recognize normally you would not want to set an entire directory to allow anyone to write to it, this is a special case.
Almost an identical build on a separate machine worked.
The output of getfacl is the same for the files and directories.
# file: . # owner: user # group: user user::rwx group::r-x other::rwx
What can cause this protection and how can it be undone?