View previous topic :: View next topic |
Author |
Message |
Mati Apprentice
Joined: 02 Sep 2008 Posts: 172
|
Posted: Sat Jun 21, 2014 12:45 pm Post subject: fstab -> mount vfat partitions from windows automatically |
|
|
Hi,
i'm trying to mount my vfat partitions (e.g., /media/Games) on boot automatically such that my default user (me) has read, write access to them. However, this does not work, whatever i try.
Here is my current fstab:
Code: |
/dev/sda14 / xfs defaults 0 1
/dev/sda15 none swap sw 0 0
/dev/sda7 /media/Games vfat defaults 0 0
|
I also tried in the sda7 options like "noatime,user" and "rw,auto" and combinations of both.
Can anybody tell me what the correct options should be?
Thanks |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sat Jun 21, 2014 1:09 pm Post subject: |
|
|
As usb key also use vfat, as ntfs share the same problem and same solution as vfat mounting problem ; it would really be hard for anyone to gave you number of threads in the forum that exists with the answer.
But ok, here's your solve
Code: | /dev/sda7 /media/Games vfat user,uid=#,gid=## |
and to get what # and ## values are, assuming "me" is really your user name
now copy "i'm a bad boy and i didn't hit search button" 100 times. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Sat Jun 21, 2014 1:15 pm Post subject: |
|
|
Hello,
you need tu use the uid, gid and umask options after the defaults one. That's give several possibilities. If you use
Code: | /dev/sda7 /media/Games vfat defaults,umask=000 0 0 |
anyone will be able to read,write and execute anything in the /media/Game directory. You can be more selective and specify a user and a group like
Code: | /dev/sda7 /media/Games vfat defaults,gid=user,uid=root,umask=007 0 0 |
That will give read, write and execute rights to root and your user group (replace user by the main group of your user) and nothing to others.
Remember that you need to give the execution right in a directory to allow effective write. So, rw must be rwx to do anything you like. In plus, you cannot change the permissions with any tool like chown and chmod for a Vfat filesystem. It will be ignored. You need to remount the Vfat filesystem with the new permissions from fstab instead.
The umask permissions are in reversed octal, so 777 become 000. _________________ Paul |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|