Locked out of My Home Directory
Something weird happened on my TiBook running Tiger sometime in the last day or two. Somehow my home directory got locked. I can see it and read files, but whenever I try to delete anything I’m asked to type in my password. And simple shell commands like “cat > test.txt” fail with a “Operation not permitted” message when executed within my home directory. The same command works outside that directory, both above and below it. That is, I can create new files inside directories inside the home directory. It’s just the root level of the home directory that’s giving me troubles. The directory is encrypted with FileVault for whatever that’s worth.
Has anyone seen anything like this before? Any suggestions?
Things that have happened recently that may have had an effect:
1. The computer failed to shut down once. I had to forcefully depower it.
2. I had one bad startup with an error whine. I had to power cycle the laptop. The next time the computer started up fine.
3. I repaired permissions last night.
As near as I can tell all the permissions and ownership and such are set appropriately. I have read and write access to the directory. I just can’t delete files from or create new files in it.
This is not an emergency. I can read all the files from the hard drive. I just have to keep typing in my password. And it’s not my primary system, just the one I use on the road. If there’s no easy way to fix this, I can straight-forwardly nuke the whole thing and copy everything over from my desktop. But I am curious to know if anyone has seen anything like this before; and, if so, if there’s a simple non-destructive way to fix it.
This might be relevant.
April 16th, 2006 at 11:52 AM
One of the flags described for chflags(1) may be set, on the directory itself or a file.
The flags are normally hidden in an ls -l listing. To reveal them, use ls -lo.
If a flag is set, and its name starts with ‘u’, it’s easy to solve: use the chflags command to remove the flag. If the flag is ‘uchg’, then you can turn it off in Finder’s Get Info window: it’s the “Locked” checkbox.
If a flag is set, and its name starts with ‘s’, like ‘schg’ or ‘sappnd’, it’s a lot harder to fix. You’ll have to reboot in single-user mode, remount file-systems as read/write, then navigate to the offender and apply ‘chflags’ to the file or dir.
By coincidence, I was mucking around with these flags yesterday, to see their effect, and your symptoms sound just like what I was observing.
April 17th, 2006 at 1:58 PM
Or could you somehow have acquired an ACL on the folder?
Are they enabled on this volume?
April 20th, 2006 at 8:46 AM
The problem was indeed that the
uchg
flag was set. Lord only knows how that happened. The Finder’s Get Info window was not able to unlock it though. I had to use $ chflags -noucgh elharo which did unlock it. Thanks for the tip!