Failure to change ownership.

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
User avatar
T J Tulley
Level 5
Level 5
Posts: 559
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Failure to change ownership.

Postby T J Tulley » Tue Jan 01, 2008 4:01 pm

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.
Yours hopefully -

Theo Tulley.
Using a PC with 2GB RAM, 3 hdds and a 1.7 GHz Celeron cpu.

Level 23
Level 23
Posts: 19587
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Failure to change ownership.

Postby Husse » Thu Jan 03, 2008 7:55 am

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
Don't fix it if it ain't broken, don't break it if you can't fix it

Return to “Newbie Questions”

Who is online

Users browsing this forum: austin.texas, Jim Hauser, kaczoland and 14 guests