What do I have to do that a user only with his user rights can mount and unmount a NTFS partition under /mnt?
I have written the following line in /etc/fstab: UUID=3FFE243E3D3C1C4A /mnt/MS_Flight ntfs rw,defaults,user 0 0, and have given the directory /mnt/MS_Flight the rights: drwxr-xr-x 2 frank frank 4096 Jul 29 12:16 MS_Flight/.
Unfortunately a mount /mnt/MS_Flight says Error opening read-only '/dev/nvme0n1p2': Keine Berechtigung Failed to mount '/dev/nvme0n1p2': Keine Berechtigung Please check '/dev/nvme0n1p2' and the ntfs-3g binary permissions, and the mounting user ID. More explanation is provided at https://github.com/tuxera/ntfs-3g/wiki/NTFS-3G-FAQ
You may have reasons for needing to mount to /mnt, but if it happens to be inconsequential, you may find less permissions issues if mounting within the user’s own home folder is an option.
Thanks to all,
unfortunately none of your methods helped. It seems that only the NTFS format is the problem, with an ext4 partition everything works as it should.
I have now set it to mount the partition normally with the system.
That’s ok, i can live with this.
chown -R username /mountpoint or something along those lines? It’s admittedly been a while since I bothered mounting ntfs drives, usually of late whenever I want to mount an ntfs partition I do it from the user through the file manager which handles these sorts of issues.
anyhow, if uid=1000 didn’t work, could it be that his user id isn’t 1000?
@Lrrr what is the output of id -u and id -G for you?
Yes, i have a dual-booting system. Fast startup is switched off (i think otherwise linux would probably point this out to me when mounting).
Above i have expressed myself unclear. I kept the NTFS mount, but entered it with UUID=3FFE243E3D3C1C4A /mnt/MS_Flight ntfs rw,auto,nofail,nls=utf8,uid=1000,gid=1000 0 0 so that it is performed automatically at system startup.
Brief background: I’m currently testing MS Flight Sim under EOS. (The default is of course Windows, that’s what it was programmed for).
When installing Flight in Windows, I installed the models/landscapes (atm approx. 170 GB) on a separate NTFS partition (the path is adjustable). The data can continue to grow there as needed.
In the Linux Flight I configed the data path to the (manually mounted) NTFS partition. It worked (so far) without any problems.
And now I wanted to code this in a small script:
mount the NTFS Flight partition
Start MS Flight (Steam)
(after closing) unmount the partition again
So I wanted to protect the large data partition from accidental writing/deleting when the Flight is not running.
The script should be executed with only my user rights. But as it looks atm the NTFS mount only seems to work under root.