[SOLVED] why the root user can not change the ownership of a hard drive, and how to do that
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.