You are not logged in.

#1 2017-12-29 10:00:54

wombatvvv
Member
Registered: 2016-07-29
Posts: 50

Can't chown or chmod on exFat USB drive...

First I installed exfat-utils with pacman in order to be able to mount. Which worked fine, I just couldn't change file permissions.  If I try chown I get "operation not permitted". If I try chmod it just fails silently.

So I did some searching and tried installing exfat-utils-nofuse from the git repositories instead. After I had done that, I just couldn't mount at all (the system no longer recognized the exfat filesystem). I found some very old threads (many years old) saying that this was a problem and the fix has since been merged into the repository (I believe it was exfat-git then, and now is exfat-utils-nofuse, as I can't find anything under "exfat-git" anymore).

I also tried changing the immutable attribute on the files (this was not allowed), as I read that in some other search result.

So in a nutshell, with exfat-utils, I can mount but not change file permissions. With exfat-utils-nofuse, I can't even mount.

Any advice?

Last edited by wombatvvv (2017-12-29 10:01:50)

Offline

#2 2017-12-29 10:06:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,821

Re: Can't chown or chmod on exFat USB drive...

What makes you believe exFAT would support POSIX owner/permission metadata?

Offline

#3 2017-12-29 10:48:09

AoiHana
Member
Registered: 2016-05-20
Posts: 5

Re: Can't chown or chmod on exFat USB drive...

But there should be a way to bypass what exFAT wants or not.

Offline

#4 2017-12-29 10:50:30

wombatvvv
Member
Registered: 2016-07-29
Posts: 50

Re: Can't chown or chmod on exFat USB drive...

seth wrote:

What makes you believe exFAT would support POSIX owner/permission metadata?

Nothing really. I just assumed there would be a way to do it. People are clever.

Offline

#5 2017-12-29 11:19:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,208

Re: Can't chown or chmod on exFat USB drive...

There are no posix file permissions, the ones you are seeing are there so that unix utilities asking for them don't freak out. The filesystem doesn't support them and you can "artificially" define which ones should be exposed to userspace at mount. They will not be in any way enforced on another system.

Offline

#6 2023-11-03 11:29:07

mgord9518
Member
Registered: 2023-11-03
Posts: 1

Re: Can't chown or chmod on exFat USB drive...

AoiHana wrote:

But there should be a way to bypass what exFAT wants or not.

This just isn't how filesystems work, it's not really possible to ignore what it "wants" or it wouldn't be the same filesystem.

I suppose you could add a special file that contains all the metadata you want to store and extend the driver (or make a FUSE overlay) to expose it and that would keep it compatible, but only people using the special driver would be able to access the permissions. I've actually considered doing this mainly for personal use, I'm shocked that I've been unable to find an existing project that does this but I'm sure it exists somewhere.

Offline

#7 2024-09-09 20:58:51

learninglinux
Member
Registered: 2024-09-09
Posts: 1

Re: Can't chown or chmod on exFat USB drive...

Hey guys, sorry to bump this... I thought this was a topic some people might find useful.

When it comes to exFAT, permissions are an issue. However, if you need to use your drive for some reason or other, NTFS is in fact POSIX compatible. Yes, you do need another drive to backup your data to.

1. Format the drive to ntfs:

lsblk
sudo umount /dev/sdX
sudo mkfs.ntfs -f /dev/sdX

2. Verify:

lsblk -f

You'll need to mount the drive with appropriate permissions. Check this link out: https://askubuntu.com/questions/208318/ … -partition

Offline

#8 2024-09-09 21:09:57

cryptearth
Member
Registered: 2024-02-03
Posts: 2,167

Re: Can't chown or chmod on exFat USB drive...

although the first necrobump was useless as A LOT changed between 2017 and 2023 - the current one is also: DON'T use NTFS from linux - end of story
why? search this very forum how many recent threads you find about data loss and corrupted NTFS file systems - iirc some where even so bad not even windows itself could recover it

stick to exfat for exchange data between OS (or use SMB/samba over network) and use os-specific FS for every day use

use ntfs is just asking for data loss - it will get you sooner or later - don't even try your risk on it - you will lose!

Offline

#9 2024-09-09 21:17:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,821

Re: Can't chown or chmod on exFat USB drive...

It's also incorrect on the matter - only the most recent  (and not mentioned in the ubuntu thread) ntfs3 as active ACL mapping, ntfs-3g has some beta code/PoC and using the (suggested in the linked thread) UID/GID/UMASK mount parameters is not only perfectly possible w/ WhateverFAT but is also not "POSIX compatible" at all. You're locking them w/ the mount to *ONE* specific value.

Offline

#10 2024-09-10 12:17:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,208

Re: Can't chown or chmod on exFat USB drive...

@learninglinux You're basically reiterating the same thing that got established in this very thread, you can configure a fake mask that will be upheld by the kernel for every tool that asks for it, it will not remember whatever you set accross different systems and you can change that willy nilly whenever you remount. As mentioned above, the newer ntfs3 driver does technically have ACL mapping, but that only helps you fake it "better" and can still be overwritten if you mount it differently.

In any case, closing this 7 year old thread.

Offline

Board footer

Powered by FluxBB