Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I have installed a new SATA hard drive to my computer. I have partitioned it, formatted the partitions (1 reiserfs, and 1 VFAT). I have automatically mounted it so that it mounts at boot. My problem is that I can't seem to use the hard drive because only root can make changes to the drive. How do I change the permissions so that I can use the drive without being root? Any help would be greatly appreciated.
once you've mounted it then you can forget that it is a seperate device when the mounted partition is unix compliant. just use chown / chmod to change the permissions and ownership of whatever you want. if it's for the vfat then you would set the umask or uid / gid directly in the /etc/fstab file as vfat can't handle per file permissions and ownership.
Edit the part of your fstab that mounts the fat drive to say users,defaults,umask=000 in the options section this will give users read/write. Mount folder must be ownd by group users. Read more on permissions for greater customization.
Thanks for the help. I now have the access required for the reiserfs partition, but no luck on the VFAT partition. I can't seem to change the ownership of the drive. I have modified the fstab to say, as suggested, users,default,umask=000, to no avail. I have also tried chown to change ownership as with reiserfs, but get told that operation not permitted. Any further advice on this one?
A quick addendum to my last post. It seems as though I need to change the group to users. How exactly do I do that? The drive is root root currently. Root users would work just fine. So, my question is how do I change the group to users?
like you have the umask value there you can also use uid=xxx and/or gid=xxx but if you are using a umask of 000 then that will allow full access irrespective of groups.
did you change the ownership of the folder you are mounting it under? I'm assuming it is still owned by root. do a 'chgrp users /mnt/fat' to give r/w access to that folder for the group users, or 'chown user /mnt/fat' for a particular user. This should work with the options users,defaults,umask=000 0 0 in the fstab. The last two 0's just means that it will not force a filesystem check. It can be kind of buggy for fat drives.
Thanks to everyone for the help. I found that I had to unmount the drive before I could make the changes to it, then remount it and all was just the way I wanted it. I really appreciate the responses I received. I only hope that someday I'll be knowledgeable enough about Linux to be able to help others as well.
I spoke too soon. Upon rebooting my machine, drive changed back to root root. Any further assistance on this matter will once again be much appreciated.
please list the entry in your fstab that mounts your fat drive. I'll be able to tell you what to fix. Also, make sure your drive is not mounted when you change the ownership of the folder you are mounting it to. I'm not sure if it matters or not but I think it does.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.