You are not logged in.
I am setting up auto mount using Systemd unit. The following configuration works for me:
[Unit]
Description=Mount Downloads at boot
Requires=systemd-networkd.service
After=network-online.target
Wants=network-online.target
[Mount]
What=//NAS/Media/Downloads
Where=/mnt/downloads
Options=credentials=/etc/samba/creds/nas,uid=125,gid=125,x-systemd.automount 0 0
Type=cifs
TimeoutSec=30
[Install]
WantedBy=multi-user.targetAccording to ArchWiki it is not recommended to setup uid,gid options. While it points to "File permissions and attributes" page as an alternative I couldn't figure out how to achieve the same result (mount share as particular user,group). So my question is in two parts:
a) If I don't use uid,gid options, how to mount CIFS share as specific user?
b) What is the issue if I use those options?
Last edited by benny (2016-10-03 04:41:06)
Offline
Any one can clarify?
Offline
No clue. But, it did take me a couple moments to realize we are talking about Samba; you may want to clarify the thread title.
Try it. Does it work?
Also, did you happen to look at the discussion tab on that page? https://wiki.archlinux.org/index.php/Ta … _automount
It has some of the comments I was going to make.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline