Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm not sure what update or action I've taken but ubuntu rather annoyingly now keeps asking the above every time I simply want to display a saved htm file in firefox. It gives me the option of running in terminal, displaying, cancel or run. It also doing it for text files as well.

I have a duel boot with win 7 and several ntfs partitions for data that I share between ubuntu and win. I recently used ntfs-config to auto mount these partitions and since then this message has displayed. I want it to revert to its previous default behaviour.

Any one any ideas as to the how or why of it, as I'm a new linux user and relatively perplexed by it!

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc    /proc   proc    nodev,noexec,nosuid 0   0
#Entry for /dev/sda9 :
UUID=1c4cd258-c17f-4757-a6fc-4bf0f958a9d6   /   ext4    errors=remount-ro   0   1
#Entry for /dev/sda6 :
UUID=01CCE74276C39A10   /media/Dataa    ntfs-3g defaults,locale=en_US.UTF-8 0   0
#Entry for /dev/sda7 :
UUID=01CCE7427B43A3F0   /media/Film ntfs-3g defaults,locale=en_US.UTF-8 0   0
#Entry for /dev/sda8 :
UUID=01CCEDC6F0F11260   /media/Linux_storage    ntfs-3g defaults,locale=en_US.UTF-8 0   0
#Entry for /dev/sda5 :
UUID=01CCE74272A05630   /media/Music    ntfs-3g defaults,locale=en_US.UTF-8 0   0
#Entry for /dev/sda1 :
UUID=2E9834EC9834B465   /media/System_Reserved  ntfs    defaults,nls=utf8,umask=0222    0   0
#Entry for /dev/sda2 :
UUID=7C5639D8563993BC   /media/sda2 ntfs-3g defaults,locale=en_US.UTF-8 0   0
#Entry for /dev/sda10 :
UUID=a2fd0541-75b9-4ccb-8a51-f6074e042a37   none    swap    sw  0   0
share|improve this question
add comment

1 Answer

This behavior happens when you double click on an executable file. Looks like this HTML file is marked as executable. You can check it right clicking on the file, selecting properties and checking the security tab.

If this file is stored in a NTFS partition, the partition has no concept of executable files. As it, the execute permission of all the files on that partition will be determined at mount time by options. It looks likely that when you played with ntfs-config you have set it so all files in that partition are executable.

As you have commented ntfs-config lacks any option to remove partitions from it, you should manually edit /etc/fstab to get the options that you want:

  1. You can remove all entries marked as ntfs in your fstab. That way Ubuntu will revert to its default behaviour. The file will be something like this:

    proc    /proc   proc    nodev,noexec,nosuid 0   0
    #Entry for /dev/sda9 :
    UUID=1c4cd258-c17f-4757-a6fc-4bf0f958a9d6   /   ext4    errors=remount-ro   0   1
     -8 0   0
    #Entry for /dev/sda10 :
    UUID=a2fd0541-75b9-4ccb-8a51-f6074e042a37   none    swap    sw  0   0
    
  2. You can add 'noexec' as an option to every line that refers to a ntfs partition. This should result in your desired behaviour: partitions will automount at boot and double clicking on a file will open it in its editor. Each line should look like this:

    UUID=7C5639D8563993BC   /media/sda2 ntfs-3g defaults,noexec,locale=en_US.UTF-8 0   0
    
share|improve this answer
    
They have been marked as executable, but can you advise how I'd use ntfs-config to make mark them as non-executable? Every time I run it it just shows a window with each drive mounted and check boxes allowing me to write to them, and right clicking does nothing. Failing that can you tell me which options I need to edit in fstab? I'll do a print of what it showing below. –  Ash Mar 12 '12 at 18:29
    
You are right. Sorry, I was remembering another ntfs config tool with loads of options. Looks like they have tuned down ntfs-config or I was wrong about the exact program. The edited answer should work, it did in a test laptop. –  Javier Rivera Mar 12 '12 at 19:06
    
Took the second option and its worked brilliantly, many thanks Javier! –  Ash Mar 12 '12 at 20:35
    
@Ash: if this solved your problem, please mark the answer as accepted. That way the question gets closed. –  Javier Rivera Mar 13 '12 at 7:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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