NTFS Permissions – How to Use ‘chmod’ on an NTFS or FAT32 Partition

chmodntfspermissions

I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.

I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything – but it also doesn't change the permissions on the file:

$ stat script.sh

  File: `script.sh'
  Size: 297070      Blocks: 584        IO Block: 4096   regular file
Device: 811h/2065d  Inode: 35515       Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx)
Access: 2010-09-30 14:05:16.041621000 -0700
Modify: 2010-09-30 14:05:05.070157000 -0700
Change: 2010-09-30 14:05:05.070475000 -0700

$ chmod 755 script.sh
$ stat script.sh

  File: `script.sh'
  Size: 297070      Blocks: 584        IO Block: 4096   regular file
Device: 811h/2065d  Inode: 35515       Links: 1
Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx)
Access: 2010-09-30 14:05:16.041621000 -0700
Modify: 2010-09-30 14:05:05.070157000 -0700
Change: 2010-09-30 14:05:05.070475000 -0700

As you can see, it remains unchanged.

Best Answer

The mode is determined by the partition's mount options (you cannot change it via chmod).

For '755' on files and '777' on directories you would use something like

sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000 /dev/whatever /mnt/whatever