Can't Create Executable Files on External Hardisk

Hi everyone,

I am a member of an academic research group that work on molecular dynamics simulations. We are using openSUSE on our server and clients.
Since we get large data files from simulation runs, we use external disks to save data files. So that we need to run scripts on external disk too.
Our critical problem is that on openSUSE 11.4, files that are in external disk can not be set as executable. For example, we have a file as ‘a.out’ and we type into terminal ‘chmod u+x a.out’ then type ‘./a.out’, nothing happens.
We didn’t encounter with this problem when we use openSUSE11.3. So we think that it may be happen because of change in kernel.

Do you have any solution for this problem?

Sincerly

Mert Demirdelen
TOBB ETU
Micro and Nano Technology

Make sure that the file systems on that disk are not mounted with the option ‘noexec’.

Thank you for your quick respond. When I plugged my external disk in to my computer with USB2.0, it automount the external disk. So I could not mount it without ‘noexec’. Also external disks that we use have NTFS filesystem. But it was not a problem when we use openSUSE11.3.

Is there any application that allow me to mount my external disk without ‘noexec’?

I forgot to write down this:

/dev/sdc1 on /media/TOBB-Murat type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)

This is what I get when I plug disk in.

I can not help with NTFS and fuse. You can run ls -la from the current directory (on this drive) to show the access rights. I would probably unmount the partition and remount it manually in ntfs-3g with the option ‘exec’, but I don’t think that’s how people do nowadays with external disks. The solution might be in fuse default_permissions. I don’t think the problem has to do with a new kernel but maybe with a change in the udev rule responsible for automounting the drive. But it would just be a blind guess, as I’m not using NTFS. (Do you have to btw?)

su -l
umount /dev/sdc1
mount -t ntfs-3g -o rw,exec /dev/sdc1 /media/TOBB-Murat

That should work but is probably not the solution you’re looking for.

On 10/25/2011 09:46 AM, mdemirdelen wrote:
> Also external disks that we use have NTFS
> filesystem. But it was not a problem when we use openSUSE11.3.

really? as far as i know NTFS has never had the ability to retain any of
the normal Linux file characteristics (either permissions or
executability)…a long ago MS decision to not support *nix file systems…

so, i wonder how 11.3 dealt with that…of course, maybe i should
mention i know very little about MS products…


DD
openSUSE®, the “German Automobiles” of operating systems

NTFS file systems are not native Linux file systems. The software that makes it possible to mount them and read/write from/to them must mimic things that are not on NTFS file systems, but that does not meab=n that NTFS file systems then by miracle hace those features (like files ownership by user/group, access bits, etc.).

You should use NTFS and other non native file systems on Linux to exchange data with other systems.
You should not use those fiile systems as substitute for native Linux file systems.

On 2011-10-25 10:28, DenverD wrote:
> On 10/25/2011 09:46 AM, mdemirdelen wrote:
>> Also external disks that we use have NTFS
>> filesystem. But it was not a problem when we use openSUSE11.3.
>
> really? as far as i know NTFS has never had the ability to retain any of
> the normal Linux file characteristics (either permissions or
> executability)…a long ago MS decision to not support *nix file systems…

Right.

It is of course their right. It is a different operating system with
different needs.

> so, i wonder how 11.3 dealt with that…of course, maybe i should mention i
> know very little about MS products…

Both FAT and NTFS filesystem get “faked” permissions at mount time, which
you can change using the fmask and dmask options in the corresponding fstab
line.

It was customary to thus have ALL files marked executable on FAT disks.
This policy may have changed, fortunately, but I haven’t followed it.

Mert: Copy the binary to your ~/bin directory and execute it there.

If the external HD is a linux type filesystem, mount it exec, manually if
need be. Default is noexec for security reasons.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thank you for all.

I also realize that problem is about NTFS. But I found a temporary solution by adding to /etc/fstab

/dev/sdc1/ /media/external ntfs exec,rw 0 1

Changing the file system to ext4 is the final solution obviously.
But I must insist that the same HD works perfectly when plugged in to computer that has openSUSE 11.3

Thank you for all again.

Security consiousnous people might argue that what you call “works perfectly” is in fact a security hole.

On 2011-10-25 12:26, mdemirdelen wrote:
> But I must insist that the same HD works perfectly when plugged in to
> computer that has openSUSE 11.3

And I explained why.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)