Re: How to gain control over the system?
On Thu 13 Jul 2017 at 15:11:59 (+0200), tomas@tuxteam.de wrote:
> On Thu, Jul 13, 2017 at 01:34:39PM +0200, Kaj Persson wrote:
>
> [...]
>
> [added cc debian-user]
>
> > Can you have this defined from /etc/fstab too? I have had no success
> > in that.
>
> This line in the fstab works for me (note: no systemd here; systemd
> is known to do things with mounting, so results may vary):
>
> # <file system> <mount point> <type> <options> <dump> <pass>
> /dev/sdb1 /media/usb0 auto rw,user,noauto,uid=tomas,gid=tomas 0 0
>
> Season to taste :-)
>
> Fixed entries in fstab are of limited use for removable media, though:
> you never know which device your stick appears as (you might use label
> or UUID, depending on your use case).
Another way that works for me is lines like:
UUID=2017-0401 /media/esxplore4g vfat rw,errors=remount-ro,utf8,shortname=lower,user,noauto,fmask=137,dmask=027
With this, whoever mounts it owns it and gets rw-r----- (files) and
drwxr-x--- (directories). All our sticks/cards etc have individual
mount points, and mount by UUID (fat) or LABEL (ext/fat).
The mount points are all created drwx------ root root
with identical timestamps, so any with devices mounted on them can
easily be spotted.
Cheers,
David.
Reply to: