# Changing ownership of home folders

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

• You should probably remount the partition in read-write mode. – enzotib Dec 17 '11 at 6:53
• Can you confirm the exact error message is "invalid operation" and not something similar like "operation not permitted"? It makes a big difference. I've never seen chown give "invalid operation" before myself. What filesystem is the new bigger partition? Are you sure it's a filesystem which supports chown? – Caesium Dec 17 '11 at 10:28

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.

• the -v option can get quite excessive and make the task take felt longer. – seb May 16 '12 at 12:09

Try this:

sudo su -