You are not logged in.
Hi there,
I want to automatically mount a smb-folder upon boot using systemd-automount in my fstab but I can't get it to have the proper permissions - it's always owned by root, and I can't change that. I want it to be owned by my user (uid=1000,gid=1000). When the mount is not active, the target folder is owned by my user. When manually mounting the folder using "sudo mount folder", the mounted folder is owned by my user.
This is my first time using systemd for mounting.
this is my fstab entry:
//server/folder /home/user/folder cifs auto,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,uid=1000,gid=1000,credentials=/home/user/.config/sambacreds 0 0
Last edited by Archlinuxomane (2020-01-04 22:30:10)
Offline
Are you married to that solution? Creating a unit file is a better solution in my experience.
https://wiki.archlinux.org/index.php/Sa … stemd_unit
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
auto,…,x-systemd.automount
Not sure what's the idea behind that but try
=>
noauto,…,x-systemd.automount
to have systemd mount the share on access.
Last edited by seth (2020-01-04 20:22:20)
Offline
Not sure why, but using a unit file gives the correct permissions. Thanks!
Offline