[Nix-dev] Can't mount fstab user mounts

Bryan Gardiner bog at khumba.net
Sun Sep 13 06:32:01 CEST 2015


Hello!

I'm having trouble getting the "user" mount option to work in fstab.
I have this:

> fileSystems."/mnt/memcard" = {
>   device = "/dev/mmcblk0p1";
>   options = "noauto,noatime,user";
> };

Which generates this just fine:

> $ grep memcard /etc/fstab
> /dev/mmcblk0p1 /mnt/memcard auto noauto,noatime,users 0 2

But when I try to mount it as a regular user, I get:

> $ mount /mnt/memcard
> mount: must be superuser to use mount

There are no errors in dmesg or journalctl.  The "users" option
doesn't work either.  What gives?  Anyone else have problems with
this?  NixOS 15.09 by the way.

Thanks,
Bryan


P.S. Also, I think this is unrelated and innocuous, but when I switch
profiles to update fstab, I get:

> setting up /etc...
> warning: not applying UID change of user ‘ntp’
> reloading the following units: mnt-memcard.mount, mnt-usb.mount
> Job for mnt-memcard.mount failed. See "systemctl status mnt-memcard.mount" and "journalctl -xe" for details.
> Job for mnt-usb.mount failed. See "systemctl status mnt-usb.mount" and "journalctl -xe" for details.
> warning: error(s) occured while switching to the new configuration

With the syslog error message being:

> systemd[1]: Unit mnt-memcard.mount cannot be reloaded because it is inactive.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150912/88d42071/attachment.bin 


More information about the nix-dev mailing list