Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fstab -> mount vfat partitions from windows automatically
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Mati
Apprentice
Apprentice


Joined: 02 Sep 2008
Posts: 172

PostPosted: Sat Jun 21, 2014 12:45 pm    Post subject: fstab -> mount vfat partitions from windows automatically Reply with quote

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
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Jun 21, 2014 1:09 pm    Post subject: Reply with quote

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
Code:
id me


now copy "i'm a bad boy and i didn't hit search button" 100 times.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sat Jun 21, 2014 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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