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 |
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.
|
^^ 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)
|
Quote:
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. |
Quote:
|
|
Thanks for your explanation voyciz!
And the link is so helpful, problem solved now. Thank you rworkman. |
All times are GMT -5. The time now is 11:31 AM. |