chmod 777 no effects on Linux Mint
NTFS does not handle file permissions in the same was as Linux, as explained in the ntfs-3g
FAQ:
Why have chmod and chown no effect? [sic]
By default files on NTFS are owned by root with full access to everyone. To get standard per-file protection you should mount with the “permissions” option. Moreover, if you want the permissions to be interoperable with a specific Windows configuration, you have to map the users.
So, either modify your /etc/fstab
with the appropriate options: (I changed default_permissions
to permissions
):
/dev/sda4 /media/DATA ntfs rw,nosuid,nodev,allow_other,permissions,blksize=4096
or, just unmount and remount manually:
sudo umount /media/DATA
sudo mount -t ntfs -o rw,nosuid,nodev,relatime,permissions /dev/sda4 /media/DATA
You should now be able to change permissions normally with sudo chmod
.
Related videos on Youtube
HAL9000
Updated on September 18, 2022Comments
-
HAL9000 almost 2 years
I'm trying to assign run privileges to a file named foobar using:
sudo chmod 777 foobar
However nothing happens. The file is located on a NTFS mounted partition. The mount command says:
/dev/sda4 on /media/DATA type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
The command
ls -l foobar
run after chmod says:
-rw------- 1 myusername myusername 2261603 Aug 29 17:54 foobar
Can somebody help me, please?
-
Jack almost 11 yearsAlso, you could try running "sudo chmod a+x foobar" just to see if you get a different result, though I doubt you would.
-
Frank Thomas almost 11 yearsLinux permissions don't work right on NTFS volumes mounted via fuse. you have to set the access modifiers in the fstab or the mount command. see the fuse options here: mjmwired.net/kernel/Documentation/filesystems/fuse.txt
-
-
HAL9000 almost 11 yearsThank you for the answer. Can I mount it automatically using your command as the system boots?
-
terdon almost 11 years@HAL9000 yes, modify
/etc/fstab
as I have shown in my answer and next time you reboot, it will be mounted with the right options. -
HAL9000 almost 11 yearsshould I only append that line in /etc/fstab? Or should I do something other? I was trying to read some tutorials but I don't know what UUID is
-
Frank Thomas almost 11 yearsa UUID is a name for your device, just like '\dev\sda1'. you can find your uuid from a terminal with 'ls -a /dev/disk/by-uuid'
-
HAL9000 almost 11 yearsI simply appended that line in /etc/fstab and it works. However now all the files on the drive are flagged as executable
-
terdon almost 11 years@HAL9000 OK, but make sure you don't have two entries mounting the same disk in
fstab
. And yes, I think that the only way to do this is having all files marked as executable but that should not be a problem since NTFS partitions should never be used as a main working partition in Linux.