[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to circumvent read-only permission

Subject: Re: How to circumvent read-only permission
From: "Norm Tovey-Walsh ndw@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Apr 2022 14:13:07 -0000
Re:  How to circumvent read-only permission
> Let me be sure that I understand the full implications of this.

Therebs 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 bmyscript.shb that is a read-only file that bcannotb be
executed:

Next run:

$ sh myscript.sh
hello world

Boom!

Telling the filesystem that a file is not executable means you canbt 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 doesnbt 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@xxxxxxxxxx>
https://nwalsh.com/

> It is undesirable to believe a proposition when there is no ground
> whatsoever for supposing it is true.--Bertrand Russell

[demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.