in reply to Re^3: perl file permissions
in thread perl file permissions
Most general-purpose apps create general text files with a generic 666 mode, and the system masks with the user's active umask value (e.g., 770 or 700), resulting in a 660 or 600 mode. A compiler might create the final executable (e.g., a.out) with a 777 mode as the point of the executable is to execute it. Since vi doesn't know that the point of a .pl file is to execute it, it doesn't go the extra mile.
(To enhance the OP's question, it does kind of sound cool if vi/emacs/jot/whatever were to make mode choices based on the extension and/or the shebang line, and to "do the right thing" automagically. Making a wrapper script for your favorite editor is a reasonable workaround; making a cronjob or a new version of Unix or bash is not.)
Anyone can write an app to create all files at 777, which would include the executable bit whether it made sense or not. He's not saying compilers are magical in this regard, just that it seems natural in that case.
--
[ e d @ h a l l e y . c c ]
|
|---|