Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
    
You should probably remount the partition in read-write mode. –  enzotib Dec 17 '11 at 6:53
2  
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

2 Answers 2

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.

share|improve this answer
    
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 -

chown -R username:username /home/username/
share|improve this answer
    
I'm not sure how this differs substantially (apart from setting the group, which you didn't explain) from what the OP has already tried in his Question? –  Caesium Dec 17 '11 at 10:21
    
as root, instead of sudo. include group (as you noted). –  david6 Dec 18 '11 at 22:17
    
Running as root instead of sudo is irrelevant. –  Scott Severance Dec 20 '11 at 18:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.