PDA

View Full Version : Couldn't create ~/.Xcode




pMan171
Apr 3, 2011, 10:24 AM
Hi all,

I'm new to Xcode and am trying to get the hang of things. However, whenever I start a new project I get the following error:

File: /SourceCache/DevToolsBase/DevToolsBase-1691/pbxcore/SourceControlManagement/SCMG3/SCMModel.m
Line: 87
Object: <SCMModel>
Method: initialize

couldn't create ~/.Xcode

Since I can't make the directory manually in Terminal, I'm thinking this is a permissions issue...? I found another post on the forums suggesting to: (1)repair permissions (didn't work), (2)Create a new admin account and see if that account works (It does).

So is my hunch that this is a permissions error correct, and, if so, how would I go about changing the permissions on ~?

OSX 10.6.6
Xcode 3.2.3

Thanks in advance



gnasher729
Apr 3, 2011, 11:39 AM
Hi all,

I'm new to Xcode and am trying to get the hang of things. However, whenever I start a new project I get the following error:

File: /SourceCache/DevToolsBase/DevToolsBase-1691/pbxcore/SourceControlManagement/SCMG3/SCMModel.m
Line: 87
Object: <SCMModel>
Method: initialize

couldn't create ~/.Xcode

Since I can't make the directory manually in Terminal, I'm thinking this is a permissions issue...? I found another post on the forums suggesting to: (1)repair permissions (didn't work), (2)Create a new admin account and see if that account works (It does).

So is my hunch that this is a permissions error correct, and, if so, how would I go about changing the permissions on ~?

OSX 10.6.6
Xcode 3.2.3

Thanks in advance

A little knowledge is dangerous. Do NOT UNDER ANY CIRCUMSTANCES change permissions for your home directory. The only thing you can achieve is seriously hosing your Macintosh.

Did you intend to use SCM? If you don't know what SCM means then you didn't intend to use it. If you didn't intend to use it then figure out in the XCode preferences how to switch it off.

chown33
Apr 3, 2011, 12:09 PM
Since I can't make the directory manually in Terminal ...

1. Post the exact command you used, and the exact error message output.


2. In Finder, can you make a new folder in your home folder or not?


3. In TextEdit, make a new document and try saving it in your home folder. Does that work or not?


4. In Terminal, copy and paste the following command-line exactly as given:
pwd; ls -an ~; id
Copy and paste the entire output into a post.

pMan171
Apr 3, 2011, 12:14 PM
Thanks for the advice, I don't have a whole lot of experience with this stuff yet.

I didn't intend to use SCM, and I checked all the Preferences tabs to see how to turn it off. It isn't enabled as far as I can tell.

Also, just after I open Xcode when I open the Preferences menu for the first time, the same error message appears. I can click "continue" and proceed to the menu, but I don't know how much I trust Xcode after...

pMan171
Apr 3, 2011, 12:28 PM
1. Post the exact command you used, and the exact error message output.

Pat$ mkdir ~/.Xcode
mkdir: /Users/Pat/.Xcode: Permission denied


2. In Finder, can you make a new folder in your home folder or not?

No, I can't. The option is greyed out under the file menu.

3. In TextEdit, make a new document and try saving it in your home folder. Does that work or not?

Error message results:
The document “Untitled” could not be saved as “Untitled”. You don’t have permission.


4. In Terminal, copy and paste the following command-line exactly as given:

Pat$ pwd; ls -an ~; id
/Users/Pat
total 88
drwxr-xr-x 24 501 501 816 Dec 25 21:05 .
drwxr-xr-x 6 0 80 204 Dec 25 21:05 ..
-rw-r--r-- 1 502 502 3 Sep 2 2007 .CFUserTextEncoding
-rw-r--r--@ 1 502 502 21508 Apr 3 13:19 .DS_Store
drwxr-xr-x 2 502 502 68 Mar 25 2008 .GuitarPro
drwx------ 27 502 502 918 Apr 2 12:01 .Trash
-rw------- 1 502 502 6765 Apr 3 13:24 .bash_history
drwx------ 3 502 502 102 Dec 5 2007 .cups
drwxr-xr-x@ 4 502 502 136 Mar 2 2008 .jagex_cache_32
-rw------- 1 502 502 35 Dec 23 14:54 .lesshst
drwx------ 3 502 502 102 Dec 17 11:48 .ssh
drwx------ 2 502 502 68 Dec 17 11:30 .vnc
drwx------ 25 502 502 850 Apr 2 12:17 Desktop
drwx------ 14 502 502 476 Feb 14 09:06 Documents
drwx------ 217 502 502 7378 Apr 2 12:01 Downloads
drwx------ 43 502 502 1462 Mar 17 16:55 Library
drwx------ 7 502 502 238 Feb 4 2010 Movies
drwx------ 6 502 502 204 Sep 3 2007 Music
-rw-r--r-- 1 502 502 0 Apr 17 2008 Opera 7 Preferences.new
drwx------@ 27 502 502 918 Feb 15 17:25 Pictures
drwxr-xr-x 5 502 502 170 Jan 20 2008 Public
lrwxr-xr-x 1 0 502 53 Dec 25 21:05 Send Registration -> /Users/Pat/Library/Assistants/Send Registration.setup
drwxr-xr-x 3 502 502 102 Jan 20 2008 Shared
drwxr-xr-x 6 502 502 204 Nov 13 2007 Sites
uid=502(Pat) gid=502(Pat) groups=502(Pat),31(boinc_project),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80 (admin),79(_appserverusr),61(localaccounts),12(everyone),402(com.apple.sharepoint.group.1),401(com.a pple.access_screensharing)


Also, when I Get Info on my home directory shows these permissions:
User2Profile: Read & Write
_unknown: read only
everyone: read only

_unknown?? Sounds spooky.

KnightWRX
Apr 3, 2011, 12:52 PM
It's pretty obvious why it's not working, your user's home directory is not owned by your user :


drwxr-xr-x 24 501 501 816 Dec 25 21:05 .
uid=502(Pat) gid=502(Pat) groups=502(Pat)


Just sudo chown Pat:Pat /Users/Pat and your problem should be solved.

pMan171
Apr 3, 2011, 01:00 PM
Just sudo chown Pat:Pat /Users/Pat and your problem should be solved.

That fixed it. Thanks for the quick help everyone!

hparekh
Apr 17, 2011, 01:30 PM
Hello, this post is helpful.. thanks everyone.. I have same issue and i followed the solution mentioned above but got stuck at last step..

3. In TextEdit, make a new document and try saving it in your home folder. Does that work or not?

No I couldnt create it


4. In Terminal, copy and paste the following command-line exactly as given:
Code:

pwd; ls -an ~; id

HemanParekh:~ hemanparekh$ pwd; ls -an ~; id
/Users/hemanparekh
total 1344
drwxr-xr-x+ 31 501 20 1054 Feb 27 2010 .
drwxr-xr-x 5 0 80 170 Mar 3 20:17 ..
-rw------- 1 501 20 3 Dec 13 2008 .CFUserTextEncoding
-rw-r--r--@ 1 501 20 21508 Apr 17 13:38 .DS_Store
drwxr-xr-x@ 3 501 20 102 Sep 22 2009 .DownloadManager
drwx------ 3 501 20 102 Apr 18 2009 .TVUPlayer for MacOS X
drwx------ 2 501 20 68 Apr 16 16:50 .Trash
-rw------- 1 501 20 0 Feb 27 2010 .Xauthority
-rw------- 1 501 20 6679 Apr 16 16:49 .bash_history
drwx------@ 3 501 20 102 Dec 20 2008 .cups
drwx------ 10 501 20 340 Sep 22 2009 .filezilla
drwxr-xr-x 31 501 20 1054 Feb 24 2010 .fontconfig
-rw-r--r-- 1 501 20 641095 Dec 26 2008 .fonts.cache-1
-rw------- 1 501 20 83 Aug 28 2010 .lesshst
-rw------- 1 501 20 28 Feb 24 2009 .mysql_history
drwxr-xr-x@ 8 501 20 272 Jan 9 2009 .viv
drwxr-xr-x 2 501 20 68 Jan 7 2009 .wapi
drwxr-xr-x 5 501 20 170 Dec 28 2008 Applications
drwx------+ 24 501 20 816 Apr 16 00:50 Desktop
drwx------+ 32 501 20 1088 Apr 16 16:47 Documents
drwx------+ 199 501 20 6766 Apr 16 19:20 Downloads
drwx------+ 48 501 20 1632 Apr 16 00:39 Library
drwx------+ 11 501 20 374 Feb 17 23:25 Movies
drwx------+ 14 501 20 476 Apr 16 00:17 Music
drwx------+ 18 501 20 612 Apr 4 18:37 Pictures
drwxr-xr-x+ 6 501 20 204 Sep 3 2010 Public
drwxr-xr-x+ 7 501 20 238 Mar 28 2009 Sites
drwxr-xr-x 4 501 20 136 Mar 24 2009 test
drwxr-xr-x 17 501 20 578 Aug 28 2010 unixstuff
drwxr-xr-x@ 3 501 20 102 Sep 11 2009 untitled folder

And i ran the command sudo chown hemanparekh:hemanparekh /Users/hemanparekh

I got reply saying -- chown: hemanparekh: Invalid argument

Can you help me here?

Thanks in advance.

KnightWRX
Apr 17, 2011, 01:35 PM
HemanParekh:~ hemanparekh$

And i ran the command sudo chown hemanparekh:hemanparekh /Users/hemanparekh

I got reply saying -- chown: hemanparekh: Invalid argument

Can you help me here?

Yes, I can. Unix is case sensitive. The proper command would have been in all probability :

sudo chown HemanParekh:HemanParekh /Users/hemanparekh

Since you omitted the output of id, I can't be sure of the group name, so if the above doesn't work, give this one a spin :

sudo chown HemanParekh /Users/hemanparekh

hparekh
Apr 17, 2011, 01:46 PM
Yes, I can. Unix is case sensitive. The proper command would have been in all probability :

sudo chown HemanParekh:HemanParekh /Users/hemanparekh

same output -- HemanParekh:~ hemanparekh$ sudo chown HemanParekh:HemanParekh /Users/hemanparekh
chown: HemanParekh: Invalid argument

Since you omitted the output of id, I can't be sure of the group name, so if the above doesn't work, give this one a spin :

sudo chown HemanParekh /Users/hemanparekh

HemanParekh:~ hemanparekh$ sudo HemanParekh /Users/hemanparekh
sudo: HemanParekh: command not found


Output of id
uid=501(hemanparekh) gid=20(staff) groups=20(staff),102(com.apple.access_screensharing),204(_developer),100(_lpoperator),98(_lpadmin),8 1(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),104(com.apple.sharepoint .group.2),103(com.apple.access_ssh),101(com.apple.sharepoint.group.1)

chown33
Apr 17, 2011, 02:23 PM
HemanParekh:~ hemanparekh$ sudo HemanParekh /Users/hemanparekh
sudo: HemanParekh: command not found

Look very carefully at what you were told to use, and what you actually used. You left out the chown command.

You should be copying and pasting command-lines, so you don't accidentally make mistakes, which could have horrible results.



Output of id
uid=501(hemanparekh) gid=20(staff) groups=20(staff),102(com.apple.access_screensharing),204(_developer),100(_lpoperator),98(_lpadmin),8 1(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),104(com.apple.sharepoint .group.2),103(com.apple.access_ssh),101(com.apple.sharepoint.group.1)
Well, your uid is 501, and 501 is already the owner of the home folder, so the sudo chown ... isn't going to help.


Post the output of the following command line:
echo ~; ls -lde ~

Copy and paste it into a Terminal window.

Also post the output of the following command line:
touch ~/example; ls -an ~


And there's an untitled folder in your home folder. Can you rename it in Finder or not?

hparekh
Apr 17, 2011, 02:40 PM
1) HemanParekh:~ hemanparekh$ echo ~; ls -lde ~
/Users/hemanparekh
drwxr-xr-x+ 31 hemanparekh staff 1054 Feb 27 2010 /Users/hemanparekh
0: group:everyone deny delete

2) HemanParekh:~ hemanparekh$ touch ~/example; ls -an ~
touch: /Users/hemanparekh/example: Operation not permitted
total 1344
drwxr-xr-x+ 31 501 20 1054 Feb 27 2010 .
drwxr-xr-x 5 0 80 170 Mar 3 20:17 ..
-rw------- 1 501 20 3 Dec 13 2008 .CFUserTextEncoding
-rw-r--r--@ 1 501 20 21508 Apr 17 13:38 .DS_Store
drwxr-xr-x@ 3 501 20 102 Sep 22 2009 .DownloadManager
drwx------ 3 501 20 102 Apr 18 2009 .TVUPlayer for MacOS X
drwx------ 2 501 20 68 Apr 16 16:50 .Trash
-rw------- 1 501 20 0 Feb 27 2010 .Xauthority
-rw------- 1 501 20 6943 Apr 17 14:38 .bash_history
drwx------@ 3 501 20 102 Dec 20 2008 .cups
drwx------ 10 501 20 340 Sep 22 2009 .filezilla
drwxr-xr-x 31 501 20 1054 Feb 24 2010 .fontconfig
-rw-r--r-- 1 501 20 641095 Dec 26 2008 .fonts.cache-1
-rw------- 1 501 20 83 Aug 28 2010 .lesshst
-rw------- 1 501 20 28 Feb 24 2009 .mysql_history
drwxr-xr-x@ 8 501 20 272 Jan 9 2009 .viv
drwxr-xr-x 2 501 20 68 Jan 7 2009 .wapi
drwxr-xr-x 5 501 20 170 Dec 28 2008 Applications
drwx------+ 24 501 20 816 Apr 16 00:50 Desktop
drwx------+ 32 501 20 1088 Apr 16 16:47 Documents
drwx------+ 199 501 20 6766 Apr 16 19:20 Downloads
drwx------+ 48 501 20 1632 Apr 16 00:39 Library
drwxr-xr-x 7 501 20 238 Dec 20 2008 LimeWire
drwx------+ 11 501 20 374 Feb 17 23:25 Movies
drwx------+ 14 501 20 476 Apr 16 00:17 Music
drwx------+ 18 501 20 612 Apr 4 18:37 Pictures
drwxr-xr-x+ 6 501 20 204 Sep 3 2010 Public
drwxr-xr-x+ 7 501 20 238 Mar 28 2009 Sites
drwxr-xr-x 4 501 20 136 Mar 24 2009 test
drwxr-xr-x 17 501 20 578 Aug 28 2010 unixstuff
drwxr-xr-x@ 3 501 20 102 Sep 11 2009 untitled folder


and NO i can't rename the 'untitled folder' in the finder

chown33
Apr 17, 2011, 03:04 PM
1) HemanParekh:~ hemanparekh$ echo ~; ls -lde ~
/Users/hemanparekh
drwxr-xr-x+ 31 hemanparekh staff 1054 Feb 27 2010 /Users/hemanparekh
0: group:everyone deny delete

That looks fine.


Post the output of this command:
ls -ldnO ~


And this one:
/sbin/mount



EDIT:
At this point, my guess for the most likely cause of the problem is that your home folder is locked.

In Finder:
1. Open a window for your home folder.
2. Choose as Icons from the View menu.
3. Right-click the window background (i.e. not on any icon or window control).
4. Observe a contextual menu appears.
5. Choose Get Info from the contextual menu.
6. An Info window for the home folder appears.
7. Expand the General element, if it isn't already visible.
8. Uncheck the Locked checkbox if it's checked.

If the Locked checkbox is checked and dimmed, the fix is more difficult.

In any case, post the output of the commands given above.

hparekh
Apr 17, 2011, 09:09 PM
here is what you asked..
1)HemanParekh:~ hemanparekh$ ls -ldnO ~
drwxr-xr-x+ 31 501 20 uchg 1054 Feb 27 2010 /Users/hemanparekh

2)HemanParekh:~ hemanparekh$ /sbin/mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)

yes the Locked option was checked, I unchecked it now..

next?

p.s. thanks for your help..

jiminaus
Apr 17, 2011, 09:33 PM
Did unchecking Locked not fix your problem?

chown33
Apr 17, 2011, 09:48 PM
Did unchecking Locked not fix your problem?

It should have.

In this output, the uchg in red corresponds precisely with the Locked checkbox.

drwxr-xr-x+ 31 501 20 uchg 1054 Feb 27 2010 /Users/hemanparekh


In this output, none of the filesystems are mounted read-only, so that wasn't what was preventing the write to home folder.
2)HemanParekh:~ hemanparekh$ /sbin/mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)


I also did some tests, and this output:
touch: /Users/hemanparekh/example: Operation not permitted

is exactly what touch outputs when a folder is locked by the uchg flag.

All other potential causes I tested have a different error message.

hparekh
Apr 19, 2011, 10:17 PM
Yes it did fix the problem. Thanks a lot chown33 and others.


p.s. sorry in delayed response

RHD
Apr 26, 2011, 01:54 PM
I had the same problem but it's a bit different.
I got the error 87 thing when I tried to start learning X code. I've had the problem for some time I now realise. I can't access some folders I created on an external hard drive as I don't have permission. I can't create a file in my home folder but the locked button is unchecked and greyed out and under Sharing and Permissions it says I can only read while -unknown can Read & Write. I have also had my Macbook renamed -1 -2 -3 -4 on my network as it says from time to time that one by that name is already logged on which is baffling.

I tried the stuff on here but to be honest I got lost. In the end I did what it said in this technote: http://support.apple.com/kb/TS1334 with the exception of the Terminal stuff which didn't seem to work. But that seems to have fixed it.
I'm on Snowleopard.

jcharnet
Feb 18, 2014, 03:50 PM
This thread just saved me from almost doing a fresh install (format) !

Thanks a lot !