You are not logged in.

#1 2014-10-25 18:42:47

mindcrime
Member
Registered: 2014-10-11
Posts: 33

[SOLVED] Need some clarification on mounting USB

This is my second installation of Arch. On my first, I installed Thunar and USBs mounted perfectly as soon as I plugged them in. Now here I am using Ranger (and Awesome WM, so no built in auto-mount) and I am a bit confused on mounting USBs. In fact, I've never even really read about specific security measures to take when mounting.

I found udevil but am a bit intimidated by the example .conf and all of the warnings... mainly because I don't understand what it all means.

So I turned to the Wiki again and found this, which makes more sense after my research: Mounting as normal user with Fstab

but I was curious, where the example says

/dev/sdXY /mnt/usbstick vfat user,noauto,noatime,flush 0 0

should I also add

nosuid,noexec,nodev

as described in ALL CAPS on the udevil config page (shown below)?

"# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
# WARNING:  OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS."

Or is that even how the syntax works?

The rest of that page, regarding mounting with fstab makes sense to me. But I am kind of a paranoid person, and I like being secure (and I'm a semi-Arch noob!), so I am not sure what to do here. Any clarification on this matter would be nice! Thanks.

Last edited by mindcrime (2014-10-25 20:13:11)


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

#2 2014-10-25 19:11:32

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Need some clarification on mounting USB

nosuid disable the setuid bit that allow a process to become root. If someone is able to mount a media containing suid files, it can easily get root access. But vfat does not support suid, so it is irrelevant here, it would be if the removable media is mounted with a ext{2,3,4} file system.

noexec: prevent executing files from the removable media. Useless in my opinion, these can still be executed if we copy them on the normal filesystem.

nodev: disable special dev file like these in dev that could be used to control the system. Unsupported on vfat. On et{2,3,4}, someone could do evil things with that.

Offline

#3 2014-10-25 19:45:58

mindcrime
Member
Registered: 2014-10-11
Posts: 33

Re: [SOLVED] Need some clarification on mounting USB

olive wrote:

-snip-

But I am still allowed to add those rules in my fstab file, even if they are redundant?

This method, editing the fstab file and using the mount command, should just "work" right?

Thanks for the information.


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

#4 2014-10-25 19:48:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Need some clarification on mounting USB

You can use udiskie and include them in your conf file: it is a much more flexible approach for USB drives...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-10-25 19:55:37

mindcrime
Member
Registered: 2014-10-11
Posts: 33

Re: [SOLVED] Need some clarification on mounting USB

jasonwryan wrote:

You can use udiskie and include them in your conf file: it is a much more flexible approach for USB drives...

A udiskie conf file?


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

#6 2014-10-25 20:05:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Need some clarification on mounting USB

mindcrime wrote:
jasonwryan wrote:

You can use udiskie and include them in your conf file: it is a much more flexible approach for USB drives...

A udiskie conf file?

Yes.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-10-25 20:12:54

mindcrime
Member
Registered: 2014-10-11
Posts: 33

Re: [SOLVED] Need some clarification on mounting USB

jasonwryan wrote:
mindcrime wrote:
jasonwryan wrote:

You can use udiskie and include them in your conf file: it is a much more flexible approach for USB drives...

A udiskie conf file?

Yes.

Cool, thanks. I'll play around with udiskie.


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

#8 2014-10-25 20:31:13

mindcrime
Member
Registered: 2014-10-11
Posts: 33

Re: [SOLVED] Need some clarification on mounting USB

Actually, I tried the fstab + regular user method, as described on the wiki, and it works. As a new Arch user I find that doing things in a way I understand, even if inefficient, is better (at least at first) because, like I said, I understand what's going on.

And I don't use USBs too often, so it's no biggy to run a quick command every time.

Thanks for the help, guys.


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

#9 2014-10-26 07:34:38

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] Need some clarification on mounting USB

mindcrime wrote:

Actually, I tried the fstab + regular user method, as described on the wiki, and it works. As a new Arch user I find that doing things in a way I understand, even if inefficient, is better (at least at first) because, like I said, I understand what's going on.

And I don't use USBs too often, so it's no biggy to run a quick command every time.

Thanks for the help, guys.

Note also that if you use one of the main Desktop environment, you can just mount the USB key à la Windows by clicking on them without any configuration. Permissions will be set automatically.

Offline

#10 2014-10-26 16:57:13

mindcrime
Member
Registered: 2014-10-11
Posts: 33

Re: [SOLVED] Need some clarification on mounting USB

olive wrote:
mindcrime wrote:

Actually, I tried the fstab + regular user method, as described on the wiki, and it works. As a new Arch user I find that doing things in a way I understand, even if inefficient, is better (at least at first) because, like I said, I understand what's going on.

And I don't use USBs too often, so it's no biggy to run a quick command every time.

Thanks for the help, guys.

Note also that if you use one of the main Desktop environment, you can just mount the USB key à la Windows by clicking on them without any configuration. Permissions will be set automatically.

Yep. I know.

mindcrime wrote:

Now here I am using Ranger (and Awesome WM, so no built in auto-mount)

Thanks anyway!

Last edited by mindcrime (2014-10-26 16:58:20)


Arch user since August 2014.
Currently flirting with BSPWM ~\\~ CLI enthusiast.
Also currently building an Arch desktop PC. Suggestions welcome!
Please excuse occasional beginner questions.

Offline

Board footer

Powered by FluxBB