Try adding uid=<your uid>,gid=<your gid> to the mount options. id will show your uid and gid (probably 1000). That should give you ownership of the file system.
can I share it with a group like that too? like 1003?
UUID=666 /media/userName/Data auto uid=1000,gid=1000,groups=1003 defaults,nofail,x-systemd.automount 0 2
?
The options user and users allow any user to mount or unmount that device. It doesn't mean that they actually have some permission for reading from or writing to that device. Afaik, the option groups=<gid> doesn't exist.
I changed the fstab to :
UUID=666 /media/myUser/Data auto defaults,nofail,x-systemd.automount,uid=1000,gid=1000 0 2
then did the following (among others)
$ chown otherUser fart.txt
chown: changing ownership of 'fart.txt': Operation not permitted
$ sudo !!
sudo chown otherUser fart.txt
[sudo] password for myUser:
$ ls -l
total 16
-rwxrwxrwx 1 myUser myUser 0 Oct 14 17:27 fart.txt
I also did try with
setfacl -g g:sharedFolders fart.txt
and it still didn't change the group.
/media/myUser/Data/docs/Subfolder/Again
is the path. The other user did mention that because this is an NTFS drive so it won't work, are they right?
The other user did mention that because this is an NTFS drive so it won't work, are they right?
Yes, the uid and gid you are setting in fstab simulate a linux uid:gid style ownership of the files an directories on the device. They can't be changed.
You may create a group, let's call it ntfsusers, and add the users that need to use the files and directories on the ntfs partition to that group and assign gid with the group id of ntfsusers in fstab.
that's what I meant with this :
can I share it with a group like that too? like 1003?
UUID=666 /media/userName/Data auto uid=1000,gid=1000,groups=1003 defaults,nofail,x-systemd.automount 0 2
?
I already have a group like that, sharedFolders, if I use the ID from that eg :
getent group
sharedFolders:x:1003:myUser,otherUser,root
and modify FSTAb like this :
UUID=666 /media/myUser/Data auto defaults,nofail,x-systemd.automount,uid=1000,gid=1003 0 2
would that work?
At least the files and directories should then have the right ownership.
I did set it to that, and the folder I am mounting to now has this :
$ ls -l
total 24
drwxr-x---+ 3 root root 4096 Aug 28 18:28 .
drwxr-xr-x 4 root root 4096 Jan 17 2026 ..
drwxrwxrwx 1 myUser sharedFolders 16384 Sep 28 23:15 Data
$pwd
/media/myUser
but when I login as otherUser, they cannot access the /media/myUser/Data folder. What could I be doing wrong?
Which groups does your ordinary user belong to and which the one that cannot acces the path?
Does the group sharedFolders have permission on the folder /media/myUser/Data before you have mounted the device?
You can't set permissions and ownership because NTFS doesn't support Linux style permissions and ownership.
Why not copy the data elsewhere, format drive to ext4 or btrfs, then copy the data back? Don't use NTFS on Linux unless you enjoy having less control, unless you're sharing the drive with Windows then you have no choice I suppose.
TLDR: NTFS bad (not really, but sort of).
If you are staying on NTFS, you can stop reading here.
Anyway if you decide to migrate off NTFS, and assuming your username is zapBrannigan:
(recursively sets user ownership to zapBrannigan, sets group ownership to root, setting the group to root is a nice default because it's effectively "no group" and limits access to non-privileged, non-you users)
sudo chown -R zapBrannigan:root /path/to/drive
(recursively sets user, group, other permissions, where 664 corresponds to "allow rw-rw-r--", in this representation, the mode bits 664 are a binary mask, 6=110, 4=100, so you're setting 110110100 which sets the allow described above)
sudo chmod -R 664 /path/to/drive
The first command sets ownership to you, the user. The second command allows the user to read and write every file, and other users to read every file, set to 660 to forbid other users.
After that I suspect your fstab issue will become solvable.
If anything scares you, audit the data and backup the critical segments before working with the drive. I am assuming you don't have free space to backup the entire drive, if you do, then just do that.
linux4noobs
linux4noobs
Noob Friendly, Expert Enabling
Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.
Seeking Support?
- Mention your Linux distro and relevant system details.
- Describe what you've tried so far.
- Share your solution even if you found it yourself.
- Do not delete your post. This allows other people to see possible solutions if they have a similar problem.
- Properly format any scripts, code, logs, or error messages.
- Be mindful to omit any sensitive information such as usernames, passwords, IP addresses, etc.
Community Rules
- Keep discussions respectful and amiable. This community is a space where individuals may freely inquire, exchange thoughts, express viewpoints, and extend help without encountering belittlement. We were all a noob at one point. Differing opinions and ideas is a normal part of discourse, but it must remain civil. Offenders will be warned and/or removed.
- Posts must be Linux oriented
- Spam or affiliate links will not be tolerated.