xsl-list
[Top] [All Lists]

Re: [xsl] How to circumvent read-only permission

2022-04-10 09:13:15
Let me be sure that I understand the full implications of this. 

There’s nothing extraordinary about this. On a Mac or Unix system, run
these commands:

$ echo 'echo "hello world"' > myscript.sh
$ chmod 400 myscript.sh
$ ls -l myscript.sh
-r-------- 1 ndw staff 19 Apr 10 15:08 myscript.sh

Now you have ‘myscript.sh’ that is a read-only file that “cannot” be
executed:

Next run:

$ sh myscript.sh
hello world

Boom!

Telling the filesystem that a file is not executable means you can’t use
it as a command from the shell. You can still send it to any interpreter
you like. You can run it as perl script, if you like:

$ perl myscript.sh
String found where operator expected at myscript.sh line 1, near "echo "hello 
world""
        (Do you need to predeclare echo?)
syntax error at myscript.sh line 1, near "echo "hello world""
Execution of myscript.sh aborted due to compilation errors.

It just doesn’t work very well!

XSLT processors are command interpreters just like bash, or perl, or
python. Caveat executor.

                                        Be seeing you,
                                          norm

--
Norman Tovey-Walsh <ndw(_at_)nwalsh(_dot_)com>
https://nwalsh.com/

It is undesirable to believe a proposition when there is no ground
whatsoever for supposing it is true.--Bertrand Russell
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

Attachment: signature.asc
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>