1

Before this, I find my shell prefix is

user@promote ~ $

here promote is my host name, and I changed it by

sudo scutil --set Hostname desktop

Now my shell prefix is

user@desktop ~ $

however, after I changed hostname, I couldn't create any folder or do any change in my home folder(~)

3
  • could you please run ls -l -d /Users/<username> as root and post the output? Note: I've changed my hostname on Mac OS X, but I have never had what you're describing happen to me afterwards. Commented Mar 30, 2014 at 5:22
  • [dj@djbook ~]$ ls -l -d /Users/dj
    – dodojava
    Commented Mar 30, 2014 at 5:27
  • drwxr-xr-x+ 29 root staff 986 Mar 30 13:26 /Users/dj
    – dodojava
    Commented Mar 30, 2014 at 5:32

1 Answer 1

3

Somehow, ownership of your home directory (and possibly some/all of its contents) got assigned to the root account, rather than your user account. This is not a result of changing your computer's hostname. Something else happened around the same time to cause this, but I can't tell what from your description.

There are a couple of ways to fix this; you can do it from Terminal with:

sudo chown -R dj /Users/dj

(I'm assuming "dj" is your account name; if not, change that parameter to your actual account name.) The other option is to use the "Reset home folder permissions and ACLs" feature in Recovery mode (instructions here).

Depending on what caused the problem, there might be other damage as well. You might need to use Disk Utility's repair permissions feature to fix system files as well, and/or reset other users' homes the same way as yours.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .