iles on ntfs partitions have no permission attributes, so linux by defaults sees some of them as executable
ntfs file systems that are mounted using the ntfs-3g driver do not have permissions or ownership, so the permissions and ownerships are set for all files and directories when the file system is mounted.
You can not change the permissions of individual files.
You can change the permissions for all of the files and dirs by remounting the file system, specifying the permissions using umask.You can search for information using Google or Duckuckgo, etc.
https://en.wikipedia.org/wiki/Umask
I mount the ntfs file system on my sda4 like this:
Code: Select all
ntfs-3g /dev/sda4 /mnt/home -o umask=0022,no_def_opts,noatime,rw,silent
I could remount the file system with different permissions like this:
Code: Select all
ntfs-3g /dev/sda4 /mnt/home -o umask=0000,no_def_opts,noatime,rw,silent[
AFAIK, I think you can remount just specifying the options that actually change, like this:
Code: Select all
ntfs-3g /dev/sda4 /mnt/home -o remount,umask=0000
There is a new driver, ntfs3, in kernels 5.15 and newer, that is supposed to support linux permissions and ownerships. I have not tried it.
Remounting a file systems that is an aufs layer may or may not work.
Shell scripts with text commands in the file are not really executable.
Shell scripts usually has as the first line something like this:
#!/bin/sh
Text files that are marked as executable will usually be executed by /bin/sh by default.
If you want a text file set as executable to not execute when clicked or executed as a shell command, you could put the shell command exit
as the first line of the text file.
If you put exec geany "$0"
as the first line of a text file, it will open in geany as an editable text file, when clicked.
A shell script can be executed like this sh myscript
whether the executable bit is set or not.