1

I'm trying to execute a script located on an NTFS partition that I own.

I own the mount point, which is ~/Migration.

ls -l in the directory where the mount point is contained shows me

 drwxrwxrwx 1 technomage technomage   4096 Sep 30 18:04 Migration

Despite being the owner of the entire structure, from the mount point and onwards, and having rwx privileges, it prevents me from executing this script, startup.sh. Bash gives me the following error:

bash: ./startup.sh: Permission denied

In the directory that contains the script, ls-la shows me:

drwxrwxrwx 1 technomage technomage 4.0K Oct  1 12:51 .
drwxrwxrwx 1 technomage technomage 4.0K Oct  1 12:51 ..
-rwxrwxrwx 1 technomage technomage 1.9K Oct  1 12:51 startup.sh

Still I cannot execute startup.sh.

I know that permissions on NTFS partitions in linux can be somewhat finnicky, so I went into the /etc/fstab and set the privileges, owners and masks as best as I could:

 UUID=6F537BB96F6E0CBC /home/technomage/Migration ntfs-3g rw,exec,user,umask=000,uid=1000,gid=1000 0 0

I then proceeded to sudo umount Migration, followed by reloading the fstab file configuration with sudo mount -a. The remounting is successful.

Despite all of this, I still cannot execute the script despite even using root.

The mount | grep sda6 command shows me the following, which tells me somehow, that the partition isn't mounting properly or using the configurations I gave it:

/dev/sda6 on /home/technomage/Migration type fuseblk (rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,user)

I'm running Debian Jessie, and even went into stretch's repository to get the latest version of the ntfs-3g driver, thinking it was some kind of bug.. no dice.

I'm not quite sure what's wrong. Please show me how I misconfigured how I mount my NTFS partition? I need total access to it.

3

You have your options right in /etc/fstab, but the order matters; exec has to come after user because user imposes noexec (among others). So your /etc/fstab entry should look like this:

UUID=6F537BB96F6E0CBC /home/technomage/Migration ntfs-3g rw,umask=000,uid=1000,gid=1000,user,exec 0 0

After the change to /etc/fstab, unmount the drive then sudo mount -a and try again.

Also, make sure your uid and gid are correct (by executing the command id when logged in with your user).

  • 1
    I cannot thank you enough for this answer. Out of all the fstab tutorials I've read, none of them mention this one small but very important detail. – steelmonkey Oct 1 '15 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.