I am trying to write a bash script, but each time I write a new script I need to change its execute permissions, e.g. chmod +x file.sh
Is it normal?
I am trying to write a bash script, but each time I write a new script I need to change its execute permissions, e.g. chmod +x file.sh
Is it normal?
Yes it works as designed. A new file gets permissions 0666 = rw-rw-rw, modified by the current umask
(which tells which bits to remove).
So with a umask of 022 new files have permissions rw-r--r--.
See the manual pages for open(2) and umask(1) for details.