I have configured fstab to mount three shares on a remote Windows PC at boot. However, when I try to access them in Dolphin I receive the error:
An error occurred while accessing ‘/example/example’, the system responded: mount.cifs: permission denied
However, if I then go to a console and run “sudo mount -a” - everything works and the shares are accessible. The fstab and win-credentials file are both owned by root.
So it’s not an issue with the remote shares, nor I think the syntax of my fstab entries. Does anyone have any idea what is causing this please?
It is always better to not only say that you think your fstab is correct, but showing it also. hen people can come to their own conclusions (in the unlikely case you have made an error). Anbd people can also gather information from it, e.g. what tyoe of file system, etc.
Many people has solved this ny using systemd-automounting (as @karlmistelberger advices). May be his post is not clear at all points. This is an alternative explanation:
The noauto and the nofail are for not mounting it on boot (that is not needed, because we mount it on need) and nofail to avoid extra problems when the mounting fails.
You can of course vary in the value of the x-stystemd.idle-timeout, after that many minutes of not being in use the fs will unmounted.
=============
Someting else (seeing your post with tyhe fstab);
There is an important, but not easy to find feature on the forums.
Please in the future use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.
The above is pretty murky and confusing wording. My post links to chapter “Automount with systemd” of fstab - ArchWiki The terms “automounting” and “automatic unmounting” precisely and concisely describe what the posted entry in /etc/fstab accomplishes.
However you are always eager to post some far fetched misinterpretation of my comments.
It’s always a good idea to check Arch Wiki before posting in this forum, in my opinion of course.