In my department we have a small file server with CentOS and samba. I have root access to be able to perform some basic maintenance.
Today I was making some folders read-only, so I went ahead and did a chmod -R -w some-folder/
, but for a few files I got the response:
chmod: ./somefile.pdf: new permissions are r-xrwxr-x, not r-xr-xr-x
After adding -v
I don't get a lot of information:
mode of `./somefile.pdf' retained as 0575 (r-xrwxr-x)
I tried the following just to make sure:
# touch test-file
# chmod -v -R -w .
mode of `./somefile.pdf' retained as 0575 (r-xrwxr-x)
chmod: ./somefile.pdf: new permissions are r-xrwxr-x, not r-xr-xr-x
mode of `./test-file' changed to 0444 (r--r--r--)
I can't think of any good reasons why root wouldn't be able to do a chmod?
Some tidbits:
- The filesystem is not read-only (only some files refused to be chmodded).
- I ran the chmod commands as root but to no effect.
- The partition where the files reside is ext4.
UPDATES:
This is the output for lsattr
on the file and containing folder:
# lsattr somefile.pdf
-------------e- somefile.pdf
# lsattr ..
-------------e- ../myfolder
There's no setuid present (ls -la
):
dr-xr-xr-x 2 userxyz abc 4096 May 30 09:29 .
dr-xr-xr-x 17 userxyz abc 4096 Sep 19 2013 ..
-r-xrwxr-x 1 userxyz abc 275150 Aug 6 2013 somefile.pdf
lsattr
on those same files, and the directory above it? – Ryder May 30 '16 at 14:44