Re: Can I set the access level to the files with specified suffix when creating?



"Zdenek Zikan" <xzikan@xxxxxxxxxx> wrote in message
news:J7uHsE.904@xxxxxxxxxxxx

To the best of my knowledge, it's mandatory to explicitly declare a
script as executable using chmod, and there are security reasons
for such.
Eeeer ... why security reasons? I cannot see any.

And _that_ is precisely the reason why.

WTF? Firstly, if this script is not executable, I can run it using "sh
script_name". Secondly, the script cannot do more than I can and if
run any program, it has the same effect with the difference that in
script files, I can (usually) watch the source. Thirdly, what is more
secure on having the script non-executable if I (or some malicious
code) can do "chmod u+x script && ./script"?

You need to study the principles of file permissions to see the error in
your statements above. Only root or the owner of a script can chmod the
script in the above manner, a clear statement of intent to do so. There is
what's considered a "security threshold", beyond which it is assumed that
you _intend_ the script to be executable, such as a deliberate chmod or "sh
scriptname". If you are an ordinary user then you can't damage anything
beyond your own user space.

"Security" doesn't necessarily imply malicious intent. Most security issues
arise from a simple uninformed decision or error on the part of a user (or
root). Executable file permissions are just one part of a larger security
philosophy that had its foundations in Unix, but has been included in Linux
by thoughtful reason of people far more intelligent than either of us.

.



Relevant Pages

  • SUMMARY WAS: OT? Philosophical Question on SA responsibilities
    ... helpful for managers interested in hiring new administrators. ... Would you go thru the 14,600 messages in root and admin ... If I was a new SA I would if encountering a security hole, ... I can see some use for the passwd -s part of the crontab script, ...
    (SunManagers)
  • Re: Clarification-Win2k Netstat sockets interpretation
    ... snip.. ... Before I could manually download every security upate and servicepack from MS.com but now...they send you a bit of Cop-code that fails to run unless ALL defences are down ... Are you sure the script from ntsvcfg is benign in addition to being useful? ... You are absolutely correct there HAL, er ah, Sebastian. ...
    (alt.computer.security)
  • [NT] Flaw in Windows Script Engine Could Allow Code Execution
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The Windows Script Engine provides Windows operating systems with the ... blocked by Outlook Express 6.0 and Outlook 2002 in their default ...
    (Securiteam)
  • Re: BUG with RES/SCRIPT/XP-SP2
    ... I consider JavaScript (known to security people as JavaVirus) as one of the Really Top ... to have a bad script cause damage to my machine. ... This security feature is called the "Local Machine Zone Lockdown". ... Tags, and the CDHtmlDialog class in this forum, and got no response. ...
    (microsoft.public.vc.mfc)
  • BUG with RES/SCRIPT/XP-SP2
    ... This security feature is called the "Local Machine Zone Lockdown". ... past week since I started posting problems with the RES Protocol, SCRIPT ... Tags, and the CDHtmlDialog class in this forum, and got no response. ...
    (microsoft.public.vc.mfc)