Re: Execute permission of a file



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.



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: OT: SYSMAN Equiv. on AIX?
    ... screen-oriented interface to various system management task, ... AIX has a slew of commands to performs the system functions that are ... AIX System Management Interface Tool lets you build an activity ... Before issuing the execute you can use F6 ...
    (comp.os.vms)
  • 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: HELP !!! No more task-bare and menu bare
    ... He should though be able to start a new terminal login from his root session and there login as himself and execute the commands to get the bars back. ... So I delete ALL my directories .xxx and ALL my files .xxx from my /home/dir then login on my Ubuntu account and it's the same!!!! ... Initializing nautilus-share extension ...
    (Ubuntu)