But everytime the system boots I get the following error as soon as I want to access the mount directory with my user:
fusermount3: user has no write access to mountpoint /run/media/user/foldername
As soon as I run sudo chown myuser:myuser on the mount point, I can access the mount without any issues. But I have to do this every time I reboot. I checked the uid and gid with the “id” terminal command, so they are correct and should be set accordingly. But instead root gets set as owner.
The weird thing is I use the exact same line of the fstab in another Manjaro Linux system, but the Full version with KDE. This error happens under the minimal Version with XFCE. Weird is also that the XFCE version also prompted me to set “user_allow_other” in /etc/fuse.conf, which is not needed in my Manjaro KDE installation, even as already stated both use the exact same fstab entry.
I hope you can help me as I googled and tried but I don’t have any more ideas.
I’m guessing this happens because everything in fstab gets mounted as root when the system starts up. According to this page you can change that by setting the uid and gid options for the mount. So changing it to:
Where <user_id> and <group_id> are the values that can be obtained by running
However, I’d suggest you switch to systemd mount units. I have a couple, and they all work an absolute charm.
Hope this helps!
When posting terminal output, copy the output and paste it here, wrapped in three (3) backticks, before AND after the pasted text. Like this:
Or three (3) tilde signs, like this:
This will just cause it to be rendered like this:
eget nisl elit id
arcu erat varius
cursus sem quis eros.
Instead of like this:
Sed sollicitudin dolor eget nisl elit id condimentum arcu erat varius cursus sem quis eros.
Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.
Thereby increasing legibility thus making it easier for those trying to provide assistance.
For more information, please see:
If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:
This will just cause the terminal output to be in English, making it easier to understand and debug.
Hey @Mirdarthos, thanks for your answer. I already showed in the example and wrote in the text below that I’ve set the uid and gid. And as you can see in the fstab example, there is an x-systemd.automount which does, as the Wiki page says, “does the magic”.
But I’ve tried it with a systemd service but now I have another problem that I always get an error that the mount dir does not exist (it seems it does not get autocreated on boot, and if I create it by myself, it get’s deleted on reboot but not recreated).
I think it must work with the fstab. It works fine on my other systems too and when I google, a lot of people use fstab and also the Arch Wiki recommends it.
Create the mount point manually, while the mount isn’t active. That should make it persistent. (Or that’s how mine is anyway. Also make sure that it’s not mounted somewhere volatile, like /run or /tmp.)
Thanks again. I already tried to remove the mount directory, it get’s recreated but it’s root:root again. It seems the fstab ignores the uid and gid. But I don’t get why (or if this is really the case).
Probably because systemd-automount does not create the whole directory? As I know it just creates the last folder, so if /run/media is there, then it will not create /run/media/username/mountpoint, because the folder username is not there. It just tries to create mountpoint.
Thanks for your efforts, but the problem in my opinion is not the location (which is used in every Arch article and automatically by the system for mounts), nor that the folder is removed or recreated at boot time, nor the access rights, but simply that the user “vommie” is not assigned while the share gets mounted. If I set it manually with chown I can access the folder for the session. And I use on other installations /run/media/… and fstab with sshfs for years without problems.
I tried “X-mount.mkdir=0755” but I guess that also only sets the permissions and not the owner. It didn’t work either unfortunately.
I will uninstall this Manjaro installation tonight (it’s a fresh install anyway) and use a “full image” instead of “minimal”, maybe just some package is missing or the XFCE version does something different than the KDE version I usually use (but also kinda weird)… :X