Page 1 of 1

Failure to change ownership.

Posted: Tue Jan 01, 2008 4:01 pm
by T J Tulley
I have long been plagued by partitions which should belong to me but obstinately get assigned to root.

Today I read the manual for chown and ran the command: $ sudo chown -R theo /media/Backups

This resulted in a lengthy process which ran through all the files in that partition - mainly 2 backups of Documents and Settings.

After that I viewed Properties of Backups again - it was still owned by root! After a restart, it is still owned by root.

So I ran the command again, without the recursive option. This time it reported that ownership had been changed - but Properties continues to show it as belonging to root.

Now I have just tried again - $ sudo chown theo /media/Backups and the response is:
chown: cannot access /media/Backups: No such file or directory.

I run $ ls -a and get the contents of my home directory. $ cd ~/ doesn't give me the root directory as I believe it should.

I need access to Backups in order to paste a backup there!

Please help.

Re: Failure to change ownership.

Posted: Thu Jan 03, 2008 7:55 am
by Husse
You should have read the man page for chown more carefully

If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given file, and the files’ group is not changed.
This means that you made theo the owner, but still had root as group. Without digging to deep I guess that's not accepted as I think root is the only member of the group root.
What happened next is a bit unclear, but it's never a good idea to repeat something that failed.....
I really don't know the root (sorry :)) of your problems, but you may solve them by adding "user" to the appropriate line in fstab, like so

Code: Select all

# /dev/sda8
UUID=788532d9-4346-4dca-9c8f-65bcb981fb3f /media/sda8     ext3    user,defaults        0       2
(of course you have to adjust according to your partitioning)
Or by mounting in a folder under home....
Oh and cd ~/ puts you in home, cd / puts you in root