The closest I got was umask to change the default permissions set for files/folders. However, umask doesn't seem to allow enabling the x
bit for files:
The base permissions for directories are 0777 (rwxrwxrwx)
and for files they are 0666 (rw-rw-rw-)
. Reference
I also saw this Ask Ubuntu post which makes sense, but still, umask clearly has an involvement in the issue, not just touch's code, because when I change umask, touch's results are affected).
Is there any way to create files with the execution bit set, at least for the user section (ideally -rwx-r-x-r-x = 755
)