Why does Ubuntu refuse to execute files from an NTFS partition?

25,372

Solution 1

I had the exact same problem and the solution in my case was to write de exec mount option after the users option. That's because the users option implicitly activate the noexec option, so you have to explicitly specify exec.

I got this from "Why can't I run programs on another partition in Linux?" on Unix & Linux Stack Exchange.

Solution 2

There were a few people mulling this one over in the chat channels. One of the people suggested that you take a look at George Edison's response to this question, and see if it helps you:
.exe file permission fail

Note that you will have to have additional mount options on an NTFS partition in order to execute binary files from those partitions directly - the users option, and also the exec option. users permits unmounting by non-superusers (as well as mounting), and exec permits executables to be run from it (however, keep in mind this isn't a guarantee to make everything work).

Solution 3

That is the "feature" of udisks package to, by default, restricts permission modification on ntfs partition (or other non-Linux partitions).

To enable this feature, you may want to read,

Enable Setting Executable Permission of Files at NTFS Partition

Share:
25,372

Related videos on Youtube

Ivan
Author by

Ivan

Updated on September 17, 2022

Comments

  • Ivan
    Ivan over 1 year

    I mount an NTFS partition (where I've got some Linux binaries and scripts alongside with Win32 and data files) with the following fstab line:

    /dev/sda5 /mnt/dat ntfs-3g rw,dev,exec,auto,async,users,umask=000,uid=1000,gid=1000,locale=en_US.utf8,  errors=remount-ro 0 0
    

    All files seem to have executable attribute set then, but if I try to actually execute them, I get "Permission denied" error. Even with sudo. Even while execute (as well as read and write) permissions are granted to everyone and all the files owner is set to the user.

    So how do I set the system up to be able to run Linux binaries from NTFS?

    • Jason Southwell
      Jason Southwell about 13 years
      possible duplicate of .exe file permission fail
    • Ivan
      Ivan about 13 years
      Hardly even related to ".exe file permission fail" question. I have no problems with .exe files. The question is NOT about running Windows executables on Linux, it is about running Linux executables located on a Windows partition.
    • Jason Southwell
      Jason Southwell about 13 years
      if you read this carefully - you will see that it is related. Or maybe you don't understand how linux sees executables. The extension doesn't make the difference.
    • psusi
      psusi over 12 years
    • Faizan Akram Dar
      Faizan Akram Dar about 9 years
      try using fmask=0022,dmask=0000 instead of umask
  • Ivan
    Ivan about 13 years
    I have no problems with .exe files. The question is NOT about running Windows executables on Linux, it is about running Linux executables located on a Windows partition.
  • Jason Southwell
    Jason Southwell about 13 years
    sigh... please read it carefully.
  • Eliah Kagan
    Eliah Kagan almost 12 years
  • TheTecno
    TheTecno about 11 years
    The link in this answer is dead :(
  • Brent Faust
    Brent Faust about 8 years
    Exactly right -- "users" sets noexec, so "users,exec" should be used, in that order.