LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How To Make Permissions For New Hard Drive? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-make-permissions-for-new-hard-drive-435185/)

Harpo 04-14-2006 03:01 PM

How To Make Permissions For New Hard Drive?
 
Hello

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.

Thanks

acid_kewpie 04-14-2006 03:53 PM

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.

drkstr 04-14-2006 06:52 PM

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.

regards,
...drkstr

Harpo 04-14-2006 09:06 PM

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?

Harpo 04-14-2006 11:56 PM

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?

acid_kewpie 04-15-2006 01:24 AM

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.

drkstr 04-15-2006 12:33 PM

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.

regards,
...drkstr

Harpo 04-16-2006 11:18 AM

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.

Harpo 04-16-2006 04:52 PM

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.

drkstr 04-16-2006 07:44 PM

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.

...drkstr

Harpo 04-18-2006 09:57 PM

Thanks once again. I managed to get it solved. I'm not even sure what it was that I did. But, all is fine now.


All times are GMT -5. The time now is 05:15 PM.