NTFS Execution Settings

Chris Jaquet chrisjaquet at gmail.com
Sat Jun 18 04:17:36 PDT 2011


Hi Martin,

Thanks for the reply, your time is much appreciated.

I understand (and agree with) the reasoning behind the decisions made (and
also that I fall into a very small use-case scenario). I remember when
everything
was marked as executable which did not make much sense but I must admit
that
I got used to it ;-)

I had hoped that there was a policy setting somewhere that could be set to
revert
to the old behaviour (pre 1.0.2) but could not find any reference to it,
though I must
admit that I struggled to find much explanatory documentation on the web
regarding the types of things that could be set, so I wondered if I was just
missing
something (I am glad to hear that was not the case ;-) ).

To answer your question, I am developing Qt applications in C++ with various

dependencies, which also often have to be rebuilt. For convenience my build
directory is on an NTFS drive so that all my source is in one place, i.e.
that a
change in one OS is directly available in the others without having to first
commit
to a repo and update/etc. Normally this is okay, but I started having issues
when
running configure/etc. on the NTFS drive (as well as running the application

itself). The first time it happened it took me a while to track down the
cause.

For my internal drives the fstab solution is the best, I guess, but for the
removable
drives it is just not practical to use any other file system than NTFS since
(at this
stage) it is the only one I know of that can be read/written by all the OSes
we use.
(Silly windows that does not support ext4 :-P )

Thanks again for the help, it is much appreciated and enjoy the weekend
further.

Cheers,
Chris

On Sat, Jun 18, 2011 at 12:27 PM, Martin Pitt <martin.pitt at ubuntu.com>wrote:

> Hello Chris,
>
> Chris Jaquet [2011-06-13 16:54 +0200]:
> > Recently in fedora 14 (and by default in fedora 15) the udisks package
> > version 1.0.2-4 has been used, and having perused the web for a while, I
> see
> > that this version is the one that by default disables execution of files
> on
> > NTFS partitions and removable devices.
>
> This was done to be consistent with VFAT handling, as they mark all
> files as executable. This is overzealous, and causes quite a lot of
> confusion as file managers like nautilus will then ask the user
> whether they want to open or run that .txt or .jpg file you want to
> look at. Now VFAT and NTFS use the showexec mount option, which causes
> only .exe, .com, and .bat files to be executable (which makes them
> work nicely with Wine or Mono), but not all files.
>
> The case where this breaks is having Linux-ish executables on VFAT and
> NTFS devices, but the fraction of people who need that is so small
> (and also presumably knowledgeable enough to know how to work around
> it) to sacrifice this against more sensible behavior of data files.
>
> > How do I go about allowing files to be executed on NTFS systems?
>
> For a particular device/partition you can create an entry in fstab
> (with LABEL= or UUID=) and set the "exec" option there.
>
> > Setting up all possible media in fstab is not an option as I also
> > work with various removable drives which need to be readable by
> > windows machines.
>
> That's currently not possible, I'm afraid. One workaround would be to
> name the executables ".exe" (if you need to run them on Windows as
> well, they need to have this anyway), or write some small shell script
> wrappers with a ".bat" name perhaps. Out of interest, is that for
> cross-platform development with C# or similar? Mono programs are
> usually named .exe anyway, to be executable under Windows.
>
> Thanks,
>
> Martin
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/devkit-devel/attachments/20110618/eed0d0c5/attachment.html>


More information about the devkit-devel mailing list