On a samba share, I have a .DS_Store file on a SMB network share that is causing havoc. Even as root, I can not delete or chmod it.
-rwx------ 1 bob acme\Domain Users 6148 Apr 24 09:11 .DS_Store*
sudo chmod 777 .DS_Store
chmod: Unable to change file mode on .DS_Store: Permission denied
sudo rm -rf .DS_Store
rm: .DS_Store: Permission denied
sudo mv .DS_Store ../
mv: rename .DS_Store to ../.DS_Store: Permission denied
Strange how the output of ls
shows this is an executable (Note the * at the end)
If I look at a similar file on my desktop, it has these permissions.
-rw-r--r--@ 1 bob acme\Domain Users 16388 May 20 15:10 .DS_Store
stat .DS_Store
771751940 3458764513820547522 -rwx------ 1 bob acme\Domain Users 0 6148 "Apr 24 09:11:42 2015" "Apr 24 09:11:42 2015" "Apr 24 09:11:42 2015" "Apr 24 09:11:42 2015" 16384 32 0x8000 .DS_Store
I can create and delete other files in the same directory as my self (no need for sudo)
The file doesn't have the immutable bit set, so why can't I delete it?
There are other related SO questions, but non of the solutions posted there work for me.
Unable to delete file, even as root
How to create a file even root user can't delete it
https://askubuntu.com/questions/378055/how-to-make-a-file-or-folder-undeletable
Update
Nothing appears to be using the file according to lsof
and fsuer
.
Strangely I could delete the file from a windows computer.
chmod
-ing the file itself won't change anything. However as root, such restrictions do not apply. – John WH Smith May 20 '15 at 21:31mount
command). Identify operating systems and versions, and, ideally, Samba versions. Please do not respond in comments; [edit] your question to add relevant information. – G-Man Says 'Reinstate Monica' May 20 '15 at 22:01