I tried to move a few files to a subfolder on OS X. One refused to move. It said Operation not permitted
. I tried again as root:
$ sudo mv file subfolder/
mv: rename file to subfolder/file: Operation not permitted
$ sudo mv file filex
mv: rename file to filex: Operation not permitted
$ lsattr file
lsattr: Inappropriate ioctl for device While reading flags on file
I tried lsattr
on other files; all files I tried gave me the same message: Inappropriate ioctl for device While reading...
Coming from Linux, I did not know about flags so here is the output of ls -leO@ file
:
$ ls -leO@ file otherfile
-rwxrwxrwx 1 eeytan staff uchg 79549 Nov 11 2010 file
-rw-r--r-- 1 eeytan staff - 5071 Sep 7 02:37 otherfile
I tried the OS X Disk Utility; it said there were no errors on my disk. What's going on here?
lsattr
isn't a standard OS X command; tryls -leO@
instead. Also, what volume is the file on? Trymount
to see what attributes the volume is mounted with.