LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2010, 04:31 PM   #1
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Rep: Reputation: 16
why the root user can not change the ownership of a hard drive, and how to do that


Hi all,
I have Slackware 12.2 installed on my computer, as well as a Windows Xp. I have a hard drive named '/fat-d', which is formatted to be 'fat' and is normally used under XP. This drive can also be accessed under Slackware, both as root and the normal user.
I can not write to the directory '/fat-d' when I am not root, it is normal since 'ls -l' shows that its owner is root and other users have no permission to write.
The problem is that, when I tried (as root) to change the owner to the normal user:

# chown [normal_user_name] /fat-d

I got an error:

chown: changing ownership of '/fat-d/':Operation not permitted

But how can the root have no permission to change the owner?
Any idea?
Thanks in advance!

Hao

Last edited by seflyer; 04-22-2010 at 04:32 PM.
 
Old 04-22-2010, 04:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980Reputation: 1980
you can't change it becuase no one owns it in the first place. fat filesystems are not posix compliant so there is nowhere for this data to be stored. as such you have options like the uid and gid options which can be used with the mount command to fudge these options in to fat mounts.
 
1 members found this post helpful.
Old 04-22-2010, 04:41 PM   #3
halborr
Member
 
Registered: Aug 2009
Posts: 112

Rep: Reputation: 18
^^ i.e. "id" to find user/group id numbers of the user, then "mount -o gid=100" (that's the user group number on this specific box)
 
Old 04-23-2010, 07:01 AM   #4
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by acid_kewpie View Post
you can't change it becuase no one owns it in the first place. fat filesystems are not posix compliant so there is nowhere for this data to be stored. as such you have options like the uid and gid options which can be used with the mount command to fudge these options in to fat mounts.
Thanks! I do have questions.
Firstly, I think root does behave as a 'owner', at least I can write or delete things in this fat disk as I wish when I logged in as root.
Second, I don't quite understand what you have said... but I will try to figure it out.
 
Old 04-23-2010, 08:40 AM   #5
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Quote:
Originally Posted by seflyer View Post
Thanks! I do have questions.
Firstly, I think root does behave as a 'owner', at least I can write or delete things in this fat disk as I wish when I logged in as root.
Second, I don't quite understand what you have said... but I will try to figure it out.
What he's saying is that nix filesystems store the permissions for all files on the disk. On MS filesystems, permissions are nonexistent. So when you mount one under Linux, imaginary permissions are created to be consistent. Similar to how you can view files on an audio CD, when really there are no files.
 
1 members found this post helpful.
Old 04-23-2010, 08:58 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,342

Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
http://slackwiki.org/Windows_Partitions
 
1 members found this post helpful.
Old 04-23-2010, 07:20 PM   #7
seflyer
Member
 
Registered: Apr 2010
Distribution: Slackware32-13.37
Posts: 58

Original Poster
Rep: Reputation: 16
Thanks for your explanation voyciz!
And the link is so helpful, problem solved now. Thank you rworkman.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change root ownership of NTFS USB hard drive rrrssssss Mandriva 14 07-10-2006 04:42 PM
I've tried everything - Can't Change Root Ownership of USB HD rrrssssss Linux - Newbie 5 11-24-2005 04:52 AM
How to change ownership of a drive? raid517 Linux - Software 1 09-15-2005 08:15 AM
External Hard Drive --No Access as USER only ROOT (10.1) 1kyle Mandriva 1 10-31-2004 09:09 AM
How can an ordinary user change a file's ownership? garymansell Red Hat 1 04-01-2004 10:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration