Labeling a .txt file permanently non-executable?
Labeling a .txt file permanently non-executable?
How could I make a .txt file permanently 'non-executable'? When I open certain text files, system asks every time whether they should be executed or just opened! For a 'notepad file' which I open and edit several tens of times every day, this can VERY annoying...
- Roland -
- caseycullen
- Posts: 519
- Joined: Sat Dec 17, 2016 7:12 am
- Location: Madison, WI USA
- Contact:
Re: Labeling a .txt file permanently non-executable?
Right click on the file and go to properties, there's a check box that labels it as executable, uncheck it.Roland wrote:How could I make a .txt file permanently 'non-executable'? When I open certain text files, system asks every time whether they should be executed or just opened! For a 'notepad file' which I open and edit several tens of times every day, this can VERY annoying...
Re: Labeling a .txt file permanently non-executable?
That's what I have already tried, but 'unchecking' is not working... The tick reappears there as soon as I reliese the mouse button! And opening the dir where the file is located as 'administrator' does not make any change.caseycullen wrote:Right click on the file and go to properties, there's a check box that labels it as executable, uncheck it.Roland wrote:How could I make a .txt file permanently 'non-executable'? When I open certain text files, system asks every time whether they should be executed or just opened! For a 'notepad file' which I open and edit several tens of times every day, this can VERY annoying...
- Roland -
- caseycullen
- Posts: 519
- Joined: Sat Dec 17, 2016 7:12 am
- Location: Madison, WI USA
- Contact:
Re: Labeling a .txt file permanently non-executable?
Is the file on an NTFS structure or was it copied from one?Roland wrote:That's what I have already tried, but 'unchecking' is not working... The tick reappears there as soon as I reliese the mouse button! And opening the dir where the file is located as 'administrator' does not make any change.caseycullen wrote:Right click on the file and go to properties, there's a check box that labels it as executable, uncheck it.Roland wrote:How could I make a .txt file permanently 'non-executable'? When I open certain text files, system asks every time whether they should be executed or just opened! For a 'notepad file' which I open and edit several tens of times every day, this can VERY annoying...
Can you try "chmod -x <file>" in terminal?
Re: Labeling a .txt file permanently non-executable?
It is on a NTFS partition if you mean that, but do not remember how it was originally created.caseycullen wrote: Is the file on an NTFS structure or was it copied from one?
Can you try "chmod -x <file>" in terminal?
That 'chmod -x' <file> gives nothing on screen.
- Roland -
- caseycullen
- Posts: 519
- Joined: Sat Dec 17, 2016 7:12 am
- Location: Madison, WI USA
- Contact:
Re: Labeling a .txt file permanently non-executable?
Ah, that makes sense. This is normal behaviour for NTFS partitions. NTFS has no ownership/permission bits, which is also how Linux records if a file is executable or not. You can set the entire partition to "not execute" in fstab if you'd like; see this.Roland wrote:It is on a NTFS partition if you mean that, but do not remember how it was originally created.caseycullen wrote: Is the file on an NTFS structure or was it copied from one?
Can you try "chmod -x <file>" in terminal?
That 'chmod -x' <file> gives nothing on screen.
Re: Labeling a .txt file permanently non-executable?
I figured out that much better way would be to use some other postfix than '.txt' for those files which system sees as potentially executable. Can you advice a postfix of some otherwise rarely used filetype which could be used for this purpose? It does not need to be really a text format, as it is enough to point e.g. Pluma to open all files of that 'type'!caseycullen wrote:Ah, that makes sense. This is normal behaviour for NTFS partitions. NTFS has no ownership/permission bits, which is also how Linux records if a file is executable or not. You can set the entire partition to "not execute" in fstab if you'd like; see this.Roland wrote:It is on a NTFS partition if you mean that, but do not remember how it was originally created.caseycullen wrote: Is the file on an NTFS structure or was it copied from one?
Can you try "chmod -x <file>" in terminal?
That 'chmod -x' <file> gives nothing on screen.
I already tested that the trick works with '.doc', but as I occasionally encounter also real word documents, it is unpractical to assign them to open in Pluma.
- Roland -