Hello. i would like to ask a general question.
What would be the best way (on the linux side) to auto mount shared ntfs partitions between Windows (7, 8, 10) and linux?
Considering:
1) Multiple users on windows (at least 2)
2) Multiple users on linux (at least the same 2 real persons)
Even knowing that there could be a risk of data loss, i would like to avoid permission restrictions on that shared folder between those different users. I mean, i would allow them to read and write on that ntfs partition (they already know it is a share).
How to auto mount ntfs partition on dual boot windows-linux to share files multi user
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to auto mount ntfs partition on dual boot windows-linux to share files multi user
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
The risk of data loss accessing an NTFS partition with linux nowadays is pretty much the same as accessing an NTFS partition with Windwoes.Laurentius wrote: ⤴Sun Apr 15, 2018 3:23 pm Even knowing that there could be a risk of data loss, i would like to avoid permission restrictions on that shared folder between those different users. I mean, i would allow them to read and write on that ntfs partition (they already know it is a share).
To achieve what you want, simply create the mount point, set permissions on it then mount the volume in fstab.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
It's just the opposite. All mounts to a mount point override the permissions of the mount point with their own. All mounts - NTFS, ext4, cifs, ...To achieve what you want, simply create the mount point, set permissions on it then mount the volume in fstab.
Anyhoo ... it looks like Mute Ant already answered this duplicate post: viewtopic.php?f=50&t=267808&p=1458449#p1458449
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
altair4 said:
also applies for a multi-user sceario, so that both users can read and write on that partition and they can also read and write the files that the other one creates?
Great!
I didn't mean to duplicate posts: the other one was a very specific question for a specific problem, and as a user is called (uid=lm) in the fstab line I was wandering what would happen if other user would try to access the partition and the files created by lm user. And what if lm tried to access the files created by the other users (on that partition). As this would be on an office environment (but few people), i did not want to go messing with permission restrictions.
I use at home a dual boot linux-linux laptop (let's say linuxmint xfce on one partiton and linuxmint cinnamon on another with a shared saparate /home folder) and share files at that ext4 partition and i ussually have trouble with permissions. I need to go changing permissions (not always, but often) when i create a file to allow the other user to write it. So, i was wondering if there was something with the options of fstab that i should learn to solve that, or if, instead, i should better read documentation about user/groups/permissions on linux
So, that way of mounting at fstab:Anyhoo ... it looks like Mute Ant already answered this duplicate post: viewtopic.php?f=50&t=267808&p=1458449#p1458449
UUID=(device) /media/mount-point ntfs defaults,uid=(user),windows_names 0 0
also applies for a multi-user sceario, so that both users can read and write on that partition and they can also read and write the files that the other one creates?
Great!
I didn't mean to duplicate posts: the other one was a very specific question for a specific problem, and as a user is called (uid=lm) in the fstab line I was wandering what would happen if other user would try to access the partition and the files created by lm user. And what if lm tried to access the files created by the other users (on that partition). As this would be on an office environment (but few people), i did not want to go messing with permission restrictions.
I was also going to make a similar question, regarding an ext4 file system, and a multi-user multi-boot set up (linux-linux). But if on this matter they are all similar, may be we can talk about it here.t's just the opposite. All mounts to a mount point override the permissions of the mount point with their own. All mounts - NTFS, ext4, cifs, ...
I use at home a dual boot linux-linux laptop (let's say linuxmint xfce on one partiton and linuxmint cinnamon on another with a shared saparate /home folder) and share files at that ext4 partition and i ussually have trouble with permissions. I need to go changing permissions (not always, but often) when i create a file to allow the other user to write it. So, i was wondering if there was something with the options of fstab that i should learn to solve that, or if, instead, i should better read documentation about user/groups/permissions on linux
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
That may be true but only insofar as one specifies permissions in the mount command, but I made no mention of that.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
An NTFS partition defined in fstab - without any other adjustments to ownership and permissions - will mount with owner = root, group = root, and permissions = 777 meaning everyone will have read / write access to the partition. You can change ownership if you want with the uid / gid options as Mute Ant suggested in your other post:Laurentius wrote: ⤴Mon Apr 16, 2018 8:49 pm altair4 said:So, that way of mounting at fstab:Anyhoo ... it looks like Mute Ant already answered this duplicate post: viewtopic.php?f=50&t=267808&p=1458449#p1458449
UUID=(device) /media/mount-point ntfs defaults,uid=(user),windows_names 0 0
also applies for a multi-user sceario, so that both users can read and write on that partition and they can also read and write the files that the other one creates?
UUID=(device) /media/mount-point ntfs defaults,uid=(user),gid=(group),windows_names 0 0
Here's the thing about NTFS which makes it different from ext4: NTFS has no Linux permissions bits - that is why chown / chmod has no affect. When you mount an NTFS partition you create a "view" of that partition that makes it appear as it does. But those permissions are immutable. The ownership and group defined in the mount are exactly the same for every single folder and file within the partition. So in the above example if agnes adds a file to the NTFS partition it will save with owner = lm but with permissions of 777 meaning everyone will have r/w access.I didn't mean to duplicate posts: the other one was a very specific question for a specific problem, and as a user is called (uid=lm) in the fstab line I was wandering what would happen if other user would try to access the partition and the files created by lm user. And what if lm tried to access the files created by the other users (on that partition). As this would be on an office environment (but few people), i did not want to go messing with permission restrictions.
The permissions of a mount point - before the partition is mounted to it - are irrelevant as they are overridden by the mount itself. Those permissions are either embedded within the partition in the case of an ext4 partition or they are defined by the mount in the case of NTFS.t's just the opposite. All mounts to a mount point override the permissions of the mount point with their own. All mounts - NTFS, ext4, cifs, ...
So the steps are:
[1] Create the mount point
[2] If it's ext4: mount the partitions first then use chown / chmod to change permissions.
[3] If it's NTFS: the mount expression itself must contain the desired permissions since once they are set they cannot be changed without a remount.
That's a whole different issue. Not a big fan of a shared home directory / partition.I use at home a dual boot linux-linux laptop (let's say linuxmint xfce on one partiton and linuxmint cinnamon on another with a shared saparate /home folder) and share files at that ext4 partition and i ussually have trouble with permissions. I need to go changing permissions (not always, but often) when i create a file to allow the other user to write it. So, i was wondering if there was something with the options of fstab that i should learn to solve that, or if, instead, i should better read documentation about user/groups/permissions on linux
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: How to auto mount ntfs partition on dual boot windows-linux to share files multi user
Great anwer, altair4. As allways.
Thanks for your attention.
I will work with this tips.
Thanks for your attention.
I will work with this tips.