Ubuntu – Changing ownership of home folders

command linefilesystempermissions

Okay, so I have a bit of a self-created problem. We were running out of space for SVN, so I moved our home folders to a new (much bigger) partition. This seemed to work fine at first, and SVN itself seems to be working no problem, as do file shares and so on… except I can no longer log in to Gnome.

When I log in, I get a message telling me .dmrc can't be locked, and that the home folder must be owned by the user with 644 permissions. That sounds straightforward enough, so I log into an the fail-safe terminal to fix it.

Logging in, I can see that the home folders are owned by root now (I assume this was a by-product of when I copied them). For some reason though, changing the owner with chown always tells me it's an invalid operation. Even if I use sudo I get that message.

I've tried changing both ownership and permission on these folders and neither is working for me. Help?

I'm trying this:

sudo chown -R username /home/username

Best Answer

To flesh out the answer a bit, you may want to look at chown's man file before you do anything, but to change the owner of all files in /home/user, you'd do:

chown -hvR user /home/user

where "user" is the name of the owner you want to change it to.

Related Question