You are not logged in.
Pages: 1
So I'm trying to get my 2 additional disks (one is for Windows formatted as NTFS, and the other one is my games drive formatted as exFAT), and the issue is this:
The disks mount and works fine, but I can't write to them without elevated rights.
for more knowledge:
the Windows drive is /dev/sdb3, mounted at "/run/media/andaro/win", and the games drive is /dev/sda1, mounted at "/run/media/andaro/games" with root being an NVMe drive, "/dev/nvme0n1p3".
Thanks for any possible help!
Last edited by adr77 (2024-10-30 16:37:26)
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
How do you mount them? What is the output of `mount`? What are the permissions on /run/media/andaro/{win,games}/?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
they mount at boot, I modified my fstab using the ArchISO after installing the ntfs-3g driver for the windows partition.
output of 'mount':
[andaro@monolith ~]$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=16310688k,nr_inodes=4077672,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=39,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=7368)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-udev-load-credentials.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev-early.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-sysctl.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-sysusers.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-vconsole-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdb3 on /run/media/andaro/win type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
tmpfs on /run/credentials/systemd-tmpfiles-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3277620k,nr_inodes=819405,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda1 on /run/media/andaro/games type exfat (rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro)
copy of my fstab if helps by chance:
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=dbfb0606-d1d1-4ee0-940b-b155ef15f423 / ext4 rw,relatime 0 1
# /dev/nvme0n1p1
UUID=386F-040A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p2
UUID=7f38652f-5416-43dd-82df-d86c60e5e5c6 none swap defaults 0 0
# /dev/nvme0n1p3
UUID=dbfb0606-d1d1-4ee0-940b-b155ef15f423 / ext4 rw,relatime 0 1
# /dev/sdb3
UUID=5418CB9A18CB7A0E /run/media/andaro/win ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 1
# /dev/nvme0n1p1
UUID=386F-040A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda1 LABEL=games
UUID=EF5E-4AD4 /run/media/andaro/games exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro 0 1
# /dev/nvme0n1p2
UUID=7f38652f-5416-43dd-82df-d86c60e5e5c6 none swap defaults 0 0
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
I don't think it is hurting anything, but you might want to clean up that /etc/fstab. Lot's of duplicate records.
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
well, I cleaned it, but it still isn't working... looks nicer, though.
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
Neither NTFS nor FAT have proper posix permission support.
You can control the file permissions globally when mounting the devices w/ uid,gid,dmask and fmask
https://man.archlinux.org/man/core/util … ns_for_fat
https://wiki.archlinux.org/title/NTFS-3 … ermissions
Offline
UUID=5418CB9A18CB7A0E /run/media/andaro/win ntfs rw,nosuid,nodev,user_id=0,group_id=0,allow_other,blksize=4096 0 1
If you want to use ntfs-3g you need to change the filesystem type to ntfs-3g. I can not find any reference to user_id=0 and group_id in https://man.archlinux.org/man/ntfs-3g.8#OPTIONS.
Offline
I'm not sure what you mean. I've updated the fs to ntfs-3g, will that help me auto-mount it r/w?
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
You esp. need to use the proper mount options.
user_id=0 and group_id=0 is no only trying to re-own the FS to UID0 (the root) but also not valid for ntfs3, https://docs.kernel.org/filesystems/ntf … nt-options nor https://man.archlinux.org/man/core/util … s_for_ntfs (I guess that's still the legacy ntfs module?)
No idea where you got that idea.
Run
mount
to see what options currently actually apply.
Offline
I'm not sure what you mean. I've updated the fs to ntfs-3g, will that help me auto-mount it r/w?
It is mounted read write or you would not be able to write to it even as root. By default ownership is assigned to root and the default dmask and fmask prevent write access to none root users. See the second link seth provided in post #7 to adjust the permissions.
Last edited by loqs (2024-10-30 15:47:01)
Offline
I've updated the fstab to use ntfs-3g instead, current 'mount' output:
[andaro@monolith ~]$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=16310688k,nr_inodes=4077672,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=39,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=8933)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-udev-load-credentials.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev-early.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-sysctl.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-tmpfiles-setup-dev.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/systemd-vconsole-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=16388108k,nr_inodes=1048576,inode64)
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sdb3 on /run/media/andaro/win type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/sda1 on /run/media/andaro/games type exfat (rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro)
tmpfs on /run/credentials/systemd-tmpfiles-setup.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3277620k,nr_inodes=819405,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
adr77 wrote:I'm not sure what you mean. I've updated the fs to ntfs-3g, will that help me auto-mount it r/w?
It is mounted read write or you would not be able to write to it even as root. By default ownership is assigned to root and the default dmask and fmask prevent write access to none root users. See the second link seth provided in post #7 to adjust the permissions.
ok, so after updating fstab to ntfs-3g, I can now r/w just fine from the Windows root.
now it's just figuring out how to get the games drive to mount r/w at boot. If you all could, try explaining it in simpler means, I've gone through a hard day at work, plus sirens are going off at the moment in another part of my city, and yap-yap.
Basically asking, simplify it, my brain is a tad off right now.
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
exfat supports uid gid dmask fmask the same as ntfs-3g so you can make the same adjustments to adjust ownership/access permissions.
Offline
lemme try it, brb
update on the situation, it won't boot with any of the ntfs-3g parameters, however, also on ntfs-3g, i have set the UID and GID to my own (andaro:andaro, 1000:1000), so there's that.
applying anything from the ntfs-3g line onto the exfat line causes the system to boot into maintenance mode. at least it boots into something.
Last edited by adr77 (2024-10-30 16:15:22)
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
Please post the fstab entries that failed to work.
Offline
current fstab:
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p1
UUID=386F-040A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p2
UUID=7f38652f-5416-43dd-82df-d86c60e5e5c6 none swap defaults 0 0
# /dev/nvme0n1p3
UUID=dbfb0606-d1d1-4ee0-940b-b155ef15f423 / ext4 rw,relatime 0 1
# /dev/sdb3
UUID=5418CB9A18CB7A0E /run/media/andaro/win ntfs-3g rw,nosuid,nodev,user_id=1000,group_id=1000,allow_other,blksize=4096 0 1
# /dev/sda1 LABEL=games
UUID=EF5E-4AD4 /run/media/andaro/games exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro 0 1
modified fstab:
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p1
UUID=386F-040A /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p2
UUID=7f38652f-5416-43dd-82df-d86c60e5e5c6 none swap defaults 0 0
# /dev/nvme0n1p3
UUID=dbfb0606-d1d1-4ee0-940b-b155ef15f423 / ext4 rw,relatime 0 1
# /dev/sdb3
UUID=5418CB9A18CB7A0E /run/media/andaro/win ntfs-3g rw,nosuid,nodev,user_id=1000,group_id=1000,allow_other,blksize=4096 0 1
# /dev/sda1 LABEL=games
UUID=EF5E-4AD4 /run/media/andaro/games exfat rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,nosuid,nodev,user_id=1000,group_id=1000,allow_other 0 1
basically just moved everything except rw and blksize
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
Unmount /run/media/andaro/games then try the following which uses uid and gid instead of user_id and group_id and drops allow_other:
# mount -o rw,relatime,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,nosuid,nodev,uid=1000,gid=1000 /dev/disk/by-uuid/EF5E-4AD4 /run/media/andaro/games
Offline
cool it works now, so now I can just apply the settings from the mount command onto my fstab?
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
Yes.
Offline
cool beans, thanks for the help
"A good attitude will always take you further than a bad habit." -Isabelle, Animal Crossing: New Leaf
meet the rig and the surprise:
monolith: AMD Ryzen 7 5800X | ASUS TUF RTX 4070 | 32GB DDR4 | DIY
olympus: Intel Core i5-8350U | Intel HD Graphics 620 | 16GB DDR4 | ThinkPad T480s
Offline
Pages: 1