Bug 81120 - Systemd automount from fstab ignores uid option and always mounts as uid=0
Summary: Systemd automount from fstab ignores uid option and always mounts as uid=0
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-09 17:03 UTC by Dāvis
Modified: 2014-07-14 11:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Dāvis 2014-07-09 17:03:03 UTC
An entry in fstab:
//REMOTE/share /mnt/share cifs username=user,password=pass,x-systemd.automount,x-systemd.device-timeout=6,uid=1000,gid=users 0 0

And systemd mounts it as

//REMOTE/share on /mnt/share type cifs (rw,relatime,vers=1.0,cache=strict,username=user,domain=REMOTE,uid=0,noforceuid,gid=100,forcegid,addr=192.168.1.2,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)

but if I mount it manually with

mount -t cifs -o username=user,password=pass,x-systemd.automount,x-systemd.device-timeout=6,uid=1000,gid=users //REMOTE/share /mnt/share

uid is correctly set

//REMOTE/share on /mnt/share type cifs (rw,relatime,vers=1.0,cache=strict,username=user,domain=REMOTE,uid=1000,forceuid,gid=100,forcegid,addr=192.168.1.2,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-07-10 00:44:23 UTC
It's probably because of a bug I introduced. Are you using systemd-215? Can you try if http://cgit.freedesktop.org/systemd/systemd/commit/?id=36a259d22c fixes things for you?
Comment 2 Dāvis 2014-07-13 15:49:36 UTC
cool, thanks, that worked :) yes, systemd-215


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.