LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how to change drive permisions (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-change-drive-permisions-620075/)

Person_1873 02-10-2008 06:30 AM

how to change drive permisions
 
i havn't struck any real issues with this yet, but i'd like to know how i can change the permissions of a mounted drive to a user rather than root, i have all my documents stored on a second partition of my HDD in a FAT32 FS, just for linux win XP cross-compatability, i mounted it as

/home/*user*/MyDocuments

at install time, but now the permissions are all for root and not *user* could someone tell me how to change this, it's using ubuntu x86_64 7.10

bigrigdriver 02-10-2008 08:06 AM

Edit /etc/fstab. Look at the mount options.

Add 'user' if you want the user to be able to munt/umount the partition. Add *nouser* if you don't want the user to mount/umount. Nouser is the default.

Add rw if you want the user to be able to read/write to the partition. Add ro if you don't want the user to read/write. I beleive *ro* is the default, but I'm not certain.

Save and close the file, then remount the partition.

Person_1873 02-10-2008 10:41 PM

right, i'll look into that, thx, can you modify these options as you use the "mount" command? i was also trying to use chmod but i didn't have a real lot of success there

J.W. 02-11-2008 03:18 AM

When you mount the drive, you cold also do something like this
Code:

mount -o umask=000 /dev/hdxy <mountpoint>
which will give the user 777 privs on the partition (obviously you'd need to substitute the actual partition and mountpoint you're using)

The umask option of course could also be changed to allow different permissions


All times are GMT -5. The time now is 05:59 AM.