chmod 777 no effects on Linux Mint

6,417

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.

Share:
6,417

Related videos on Youtube

HAL9000
Author by

HAL9000

Updated on September 18, 2022

Comments

  • HAL9000
    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
      Jack almost 11 years
      Also, 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
      Frank Thomas almost 11 years
      Linux 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
    HAL9000 almost 11 years
    Thank you for the answer. Can I mount it automatically using your command as the system boots?
  • terdon
    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
    HAL9000 almost 11 years
    should 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
    Frank Thomas almost 11 years
    a 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
    HAL9000 almost 11 years
    I simply appended that line in /etc/fstab and it works. However now all the files on the drive are flagged as executable
  • terdon
    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.