0

When clicking on a file in my Ubuntu's file explorer Nautilus, for most types it asks me each time whether I want to run or view it. E.g. .csv, .txt, .sh, but not e.g. .xls (which readily opens with LibreOffce calc).

This, depsite my file not having the explicit executable permission x (and even if I explicitly use chmod -x before).

Why, and how to avoid it?

Note, this question has been answered for textfiles in MATE, here. I post the general version here to possibly help others who like me struggle to readily find that or any other answer/question.

1 Answer 1

1

The answer here specifically given for the similar question for MATE and textfiles, applies, at the very least mostly:

  • Solve it by: Nautilus -> Edit\Preferences\Behavior\ -> Choose "View executable text files ..." rather than "Ask each time"
  • Origin of behavior (and further way to address the issue): Your drive file system may be NTFS or FAT[32] (including EFI). Neither support unix file permissions, meaning by default the whole volume gets mounted with execute permissions for all files. In /etc/fstab you can specify noexec as a mount option for the entire partition.

See further here for more info on Nautilus preferences.

3
  • 2
    Note that neither NTFS nor FAT[32] (including EFI) support unix file permissions. In /etc/fstab you can specify noexec as a mount option for the entire partition.
    – Siep
    Jun 17, 2020 at 8:45
  • Thanks, I will try that out. Btw, I reckon this does not by chance explain also why I remain unable to change file associations on my machine (at least I'm unable to have .csv default to be playonlinux\Excel instead of LO calc), else I'm glad for a note. Ignore if seems unrelated
    – FlorianH
    Jun 17, 2020 at 8:55
  • 1
    Please indeed update the part on "Origin of behaviour" with the comment of Siep. It is due to these file systems not supporting file permissions - hence the whole volume is by default mounted with execute permissions for all files.
    – vanadium
    Jun 17, 2020 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .