Re: Execute permission of a file
- From: "Green, Simon" <Simon.Green@xxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 17:24:11 +0200
That's not entirely correct.
"sh" is just the default shell. It will read "filename" and interpret it as
shell commands. The file only needs to be readable, as it's "sh" that's
being executed, not "filename".
/usr/bin/sh is usually linked to the Korn shell, so if the file does not
contain Korn script commands it will fail. i.e. A Perl script or even
Bourne script won't work, and a binary executable certainly won't!
The advantage of making a file executable is that you don't have to worry
about what to invoke it with: it could be Perl, Korn, or anything else and
you just have to run it and leave AIX to figure it out. (There are rules
governing how AIX does this: take a look at the man page for the "file"
command.)
--
Simon Green
Altria ITSC Europe s.a.r.l.
AIX-L Archive at https://lists.princeton.edu/listserv/aix-l.html
New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.
-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
faisalq . (faisalq)
Sent: 29 June 2006 14:12
To: aix-l@xxxxxxxxxxxxx
Subject: Execute permission of a file
Dear all,
Pl. bear with me, it may be a very naive question.
If a user can execute any file using 'sh filename' - even though he doesn't
have 'execute' permission, what is the significance of 'x' bit in unix?
A colleague asked this question, and i could not answer.
Thanks.
- Prev by Date: Re: Password Expiration on 5.2
- Next by Date: Re: tty1 or tty2 how about both?
- Previous by thread: Re: Execute permission of a file
- Next by thread: Password Expiration on 5.2
- Index(es):
Relevant Pages
- [UNIX] Vulnerabilities Found in Scponly
... SSHd environment files. ... the user can upload a file with a custom
... This provides the user with a means of running arbitrary commands ... the user
could execute arbitrary commands by uploading ... (Securiteam) - Re: [Full-disclosure] FWD Cisco IOS Remote Command Execution Vulnerability
... > Vulnerability Alert Cisco IOS Remote Command Execution ... > 9.4 Last
Change Cisco has responded to this issue; ... > prone to an issue that may permit gay
people to execute arbitrary ... > commands from a password prompt. ...
(Full-Disclosure) - Dont mind if I grouse on some basic topics?? (very long)
... I know as experienced programmers you really don't want to hear people gripe ...
and moan about basic, indeed critical topics, but I just have to vent on ... commands
within a set sequence. ... doesn't appear to uniformly execute them. ... (comp.windows.x) - Re: Redirection issue
... 1- execute input commands from standard input, ... the phrase "it does not work
anymore" carries very little meaning. ... after compilation and execution of the shell
with a simple command like ... (comp.lang.c) - Re: Newbie
... I will now tell you some basic commands. ... Easy file has rights and a owner.
... file and who may execute it. ... The last three characters are about the permissions
of user ... (alt.linux)