Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

[solved! & lots of examples] Access to fat32 & ntfs partition

Help for Current Versions of MX
User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 403
Joined: Sat Mar 10, 2018 9:06 pm

[solved! & lots of examples] Access to fat32 & ntfs partition

#1

Post by Buck Fankers » Mon May 27, 2019 4:53 am

(answers: fat32 - post #6; ntfs - post #10)

I'm setting up MX for someone and he wants to have fat32 partition as spare data patrition.

I set it up in fstab and it gets mounted as it should. But I don't know how to get full rights to it. Thunar used to have right click option for this that was recently removed. I know how to do it for ext4:

mx is user and 'PODATKIWIN' is fat32 partition

Code: Select all

sudo chown -R $USER /media/mx/PODATKIWIN/ 
or:

Code: Select all

sudo chown -R $USER:$USER /media/mx/PODATKIWIN/
When I execute upper commands, there is output in the terminal for each file, chown: changing the permission, and at the end the line, how operation is not permitted. (i'm translating from different language, so not exact wording)

I can see the files, I can open them, (they are pictures I can see them) but I can't arrange them , delete them, cant create new folder. Well I probably can with root thunar, but this computer will use first time Linux user and I would like he wouldn't use root thunar.

My Pictures folder properties: (all greyed out in regular thunar)
Owner: root(root)
Access: Read & Write
Group: root
Access: Read only
Others: Read only
I tried to run thunar as root and change permissions via properties -> tab Permissions, but I get the same msg that operation is not permitted. What are my options?

Btw, I'm typing this on different computer, I'm currently not at the computer I'm talking about and setting it up, so I currently can't post any system/other info
Last edited by Buck Fankers on Sun Jun 30, 2019 2:20 am, edited 2 times in total.

User avatar
mxer
Forum Regular
Forum Regular
Posts: 166
Joined: Fri Sep 21, 2018 9:09 am

Re: Access to fat32 partition

#2

Post by mxer » Mon May 27, 2019 5:27 am

My advice don't do it, use a Linux file system!

He can still use external media using fat/vfat file system, which is likely what he really wants.

There are no permissions on fat/vfat file systems, & trying to set them up for users is difficult.

(Just teach him to use sudo to write to his external fat/vfat media.)
(FOSS, Linux, & BSD since 1999)

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4574
Joined: Wed Apr 11, 2018 5:09 pm

Re: Access to fat32 partition

#3

Post by fehlix » Mon May 27, 2019 5:38 am

Buck Fankers wrote:
Mon May 27, 2019 4:53 am
I'm setting up MX for someone and he wants to have fat32 partition as spare data patrition.

I set it up in fstab and it gets mounted as it should. But I don't know how to get full rights to it.
On vfat (and ntfs) the permission and ownership are determined during mount.
So you need to add those mount-options withn fstab to the mount option field:

Code: Select all

uid=1000,gid=1000,fmask=0113,dmask=0002
where 1000, is uid and groupid of the user.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 403
Joined: Sat Mar 10, 2018 9:06 pm

Re: Access to fat32 partition

#4

Post by Buck Fankers » Mon May 27, 2019 6:15 am

mxer wrote:
Mon May 27, 2019 5:27 am
My advice don't do it, use a Linux file system!
He can still use external media using fat/vfat file system, which is likely what he really wants.
I was/am considering this option as well :-)

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 403
Joined: Sat Mar 10, 2018 9:06 pm

Re: Access to fat32 partition

#5

Post by Buck Fankers » Mon May 27, 2019 6:17 am

fehlix wrote:
Mon May 27, 2019 5:38 am
On vfat (and ntfs) the permission and ownership are determined during mount.
So you need to add those mount-options withn fstab to the mount option field:

Code: Select all

uid=1000,gid=1000,fmask=0113,dmask=0002
where 1000, is uid and groupid of the user.
:puppy:
Great, thank you, will give it a try, I' assuming I'm just adding those parameters at the end.
If I don't get it right, he will have to get used to Linux only file system on his hdd and use portable storage hdd for data transfer.

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4574
Joined: Wed Apr 11, 2018 5:09 pm

Re: Access to fat32 partition

#6

Post by fehlix » Mon May 27, 2019 6:54 am

Buck Fankers wrote:
Mon May 27, 2019 6:17 am
fehlix wrote:
Mon May 27, 2019 5:38 am
On vfat (and ntfs) the permission and ownership are determined during mount.
So you need to add those mount-options withn fstab to the mount option field:

Code: Select all

uid=1000,gid=1000,fmask=0113,dmask=0002
where 1000, is uid and groupid of the user.
Great, thank you, will give it a try, I' assuming I'm just adding those parameters at the end.
... add it to the 4th option field of the fstab entry, comma-separated.
so it might look like this example line

Code: Select all

UUID=XXXX-XXXX    /media/blabla    vfat    defaults,user,uid=1000,gid=1000,fmask=0113,dmask=0002    0    0
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 403
Joined: Sat Mar 10, 2018 9:06 pm

Re: Access to fat32 partition

#7

Post by Buck Fankers » Mon May 27, 2019 7:14 am

fehlix wrote:
Mon May 27, 2019 6:54 am
... add it to the 4th option field of the fstab entry, comma-separated.
so it might look like this example line

Code: Select all

UUID=XXXX-XXXX    /media/blabla    vfat    defaults,user,uid=1000,gid=1000,fmask=0113,dmask=0002    0    0
:puppy:
Works like a charm! I've learned new trick today.
Thank you very much, you are always so helpful!

User avatar
greywolf
Forum Regular
Forum Regular
Posts: 116
Joined: Sun Apr 20, 2008 9:06 pm

Re: Access to fat32 partition

#8

Post by greywolf » Mon May 27, 2019 8:27 am

Buck Fankers wrote:
Mon May 27, 2019 7:14 am
fehlix wrote:
Mon May 27, 2019 6:54 am
... add it to the 4th option field of the fstab entry, comma-separated.
so it might look like this example line

Code: Select all

UUID=XXXX-XXXX    /media/blabla    vfat    defaults,user,uid=1000,gid=1000,fmask=0113,dmask=0002    0    0
:puppy:
Works like a charm! I've learned new trick today.
Thank you very much, you are always so helpful!
Is this sort of stuff in the wiki? Fat32 permissions etc I mean. Should be if it is not already.

Some "sudo only" distros set this stuff "magically" keeping it transparent to the user. Wrong in my opinion, as there is no opportunity to learn "the Linux way" of thinking about security. I think it is really important for new users with a foot still in the other camp to understand this stuff early in their migration.

Just a thought,
greywolf.
It is about the Dragons - it was always about the Dragons!

User avatar
Buck Fankers
Forum Regular
Forum Regular
Posts: 403
Joined: Sat Mar 10, 2018 9:06 pm

Re: Access to fat32 partition

#9

Post by Buck Fankers » Sat Jun 29, 2019 7:17 am

fehlix wrote:
Mon May 27, 2019 6:54 am
On vfat (and ntfs) the permission and ownership are determined during mount.
So you need to add those mount-options withn fstab to the mount option field:
... add it to the 4th option field of the fstab entry, comma-separated.
so it might look like this example line

Code: Select all

UUID=XXXX-XXXX    /media/blabla    vfat    defaults,user,uid=1000,gid=1000,fmask=0113,dmask=0002    0    0
:puppy:
This worked great for fat32 partition. Someone wanted to have access to NTFS partition and I couldn't get it working for NTFS.
I changed 'vfat' part to 'ntfs' that didn't help either. Do you happen to have example also for ntfs?

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4574
Joined: Wed Apr 11, 2018 5:09 pm

Re: Access to fat32 partition

#10

Post by fehlix » Sat Jun 29, 2019 9:24 am

Buck Fankers wrote:
Sat Jun 29, 2019 7:17 am
Do you happen to have example also for ntfs?
Mount NTFS with fstab

Examples:
Mount name: MyNtfsData
Create mount point
sudo mkdir /mnt/MyNtfsData
Read write for all users
Find UUID XXXX, with

Code: Select all

lsblk -f
Make sure WinOS was shutdown without fastboot, if the NTFS partition is managed by WinOS, otherwise access from Linux will normally be read-only.

NTFS fstab mount - simple: no automount - Not shown in Thunar

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,noauto,users,gid=100,uid=1000,fmask=0113,dmask=0002,ntfs-3g 0 0
NTFS fstab mount - simple: with "boot"-automount - Not shown in Thunar

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,nofail,users,gid=100,uid=1000,fmask=0113,dmask=0002,ntfs-3g 0 0
NTFS fstab mount - advanced: default Icon shown in Thunar, no automount
All users can mount and unmount with click in Thunar.

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,noauto,users,gid=100,uid=1000,fmask=0113,dmask=0002,x-gvfs-show,x-gvfs-name=MyNtfsData,ntfs-3g 0 0
NTFS fstab mount - advanced: default Icons shown in Thunar, with "boot"-automount
All users can mount and unmount with click in Thunar.

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,nofail,users,gid=100,uid=1000,fmask=0113,dmask=0002,x-gvfs-show,x-gvfs-name=MyNtfsData,ntfs-3g 0 0
NTFS fstab mount - advanced: with Icons shown in Thunar, no automount
All users can mount and unmount with click in Thunar.
Icon example: view-private-symbolic

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,noauto,users,gid=100,uid=1000,fmask=0113,dmask=0002,x-gvfs-show,x-gvfs-name=MyNtfsData,x-gvfs-icon=view-private,x-gvfs-symbolic-icon=view-private-symbolic,ntfs-3g 0 0
NTFS fstab mount - advanced: with Icons shown in Thunar, with "boot"-automount
All users can mount and unmount with click in Thunar.

Code: Select all

UUID=XXXXXXX /mnt/MyNtfsData ntfs-3g defaults,nofail,users,gid=100,uid=1000,fmask=0113,dmask=0002,x-gvfs-show,x-gvfs-name=MyNtfsData,x-gvfs-icon=view-private,x-gvfs-symbolic-icon=view-private-symbolic,ntfs-3g 0 0
HTH
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “MX Help”