file locking confusion

JeffZPgh

Registered
I restored a CD backup of some files from my home directory to a new machine. I had a problem with iTunes crashing after doing this, which I traced to the fact that the "iTunes Music Library" file is somehow locked.

Now here's the confusing part: in Terminal, I verified that the file is owned by my user and that permissions are set correctly (rw for user). Yet I cannot write to the file, nor delete it with "rm", nor move it with "mv" (I get "Operation not permitted" errors). Not even as root!

So my question is this: what file locking mechanism is being used besides regular Unix-style file permissions, such that I can't do a thing with this file? How can I reset the lock? And how can I prevent being screwed in the future when restoring backups made to CD?

Jeff
 
OS X also has file flags (man chflags for info) for files. If you do an 'ls -lo' and see 'uchg' you won't be able to do much to the file. Running 'chflags nouchg filename' will clear that.

Why it was set that way in the first place, I'm not sure.
 
Wow - never heard of chflags, and I've been using various unix flavors for 8 years or so. Thanks for the tip - that fixed the problem!

Jeff
 
Back
Top