Reputation: 95
I have been working on a project and since last week xcode does not let me make any changes in my xib file and another page in the project. However I can make changes in other pages. When I open it as root I can make changes in main.xib as well. What can cause this? It is very annoying.
This is what I get:
“MainWindow.xib” is locked for editing and you may not be able to save your changes. Do you want to unlock it?
Upvotes: 0
Views: 577
Reputation: 122411
Sounds like you have lost ownership of your own files (or some reason). You can confirm this from the command line by simply listing them (ls
), for example:
$ ls -l
total 184
-rwxr-xr-x 1 andy staff 2731 7 Dec 2010 AppDelegate.h
-rwxr-xr-x 1 andy staff 3976 7 Dec 2010 AppDelegate.m
-rwxr-xr-x 1 andy staff 2625 7 Dec 2010 Choices.h
...
My username is 'andy', so I already own these files, however if I didn't, I could change ownership of the whole directory hierarchy using chown
as root:
$ ls -l
total 0
drwxr-xr-x 12 andy staff 408 15 Dec 2010 CFLocalServer
drwxr-xr-x 23 andy staff 782 18 Dec 2010 GridMenu
drwxr-xr-x 12 andy staff 408 16 Dec 2010 Hello
drwxr-xr-x 16 andy staff 544 18 Dec 2010 NSTableViewBinding
drwxr-xr-x 18 andy staff 612 18 Dec 2010 OpenCL_OceanWave
$ sudo chown -R andy:staff *
Password:
$
You can do this using Finder, but that isn't so easy to explain.
Ultimately you need to find out why you lost ownership as currently you are not in control of your own machine, it is in control of you.
Upvotes: 1