I have a lot of text files that I copied over from a NTFS volume which, when I open them in Ubuntu MATE 15.04 through the Caja file manager, open as executable and show the dialog box which asks me if I want to execute the file.

Is this a bug or normal behavior? This didn't used to happen in Thunar on Xubuntu.

  • Hint: and those files have the executable persmissions set on Caja and did not on Thunar? ;-) – Rinzwind Apr 28 '15 at 10:21
  • I don't have Xubuntu installed now so it's hard to know for certain. – warsong Apr 28 '15 at 10:33

It is normal behaviour. Well sort of. Be careful with regards to NTFS. Those partitions tend to be mounted as executable making all files ... executable.

This one-liner will remove execute from .txt from the directory you execute it:

find . -type f -iname "*.txt" -exec chmod -x {} \;

When a text file has executable permissions set or is recognized as executable generally it will ask for it to be executed or to be viewed.

Nautilus also has a setting for this in "Edit" "preferences" "Behavior". Caja has the same option (though I have not found an image for Caja).

enter image description here

| improve this answer | |
  • What I'm unclear about is whether the permission is being set when I copy it over in Ubuntu MATE or whether it was already set like that. I copied the files over from a NTFS volume, I should have mentioned that. – warsong Apr 28 '15 at 10:43
  • @warsong depending on how it was mounted, NTFS partitions can have everything marked as executable, so that might be the culprit. – muru Apr 28 '15 at 10:46
  • @warsong you should have indeed. see the edit ;-) – Rinzwind Apr 28 '15 at 11:19

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.