Patrick Shanahan said the following on 09/12/2011 08:17 AM:
* Peter Nikolic<p.nikolic1@btinternet.com> [09-12-11 03:15]:
IS that not heading into dangerous territory having the ability to execute a script without the right permissions ie getting too much like windows and one of the reasons why windows is so wide open and linux has so far been top of the class this does not sound good.
You are not *thinking* about it. You are not actually *running* the script, you are running bash or sh which you do have permissions to execute and bash/sh is acting on the script instructions.
The shell is a command interpreter. Not a line internperter,; it can handle structured programs. It can handle this from the console. You can enter 'if', 'for' and all the rest, at the console. Find a small shell script and try entering from the console. Now try cat smallscript.sh | sh or sh < smallscript.sh So long as 'smallscript.sh' is readable its execute permissions are irrelevant. Those are syntactically equivilent to sh smallscript.sh Please read the man page on the shell. Right there at the beginning: <quote> Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. </quote> and <quote> If arguments remain after option processing, and neither the -c nor the -s option has been supplied, the first argument is assumed to be the name of a file containing shell commands. </quote>
There is no security/permissions problem, it is acting as intended.
At least research the situation before making wild statements.
As in RTFM. -- "On two occasions I have been asked (by members of Parliament!), 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage 1791-1871) English computer pioneer, philosopher -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org