<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sh: ls: Execute permission denied. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092921#M442702</link>
    <description>Let me press on about this. What if I want to pass a command with environment variable expansion onto su? I surely cannot use single quotes, can I?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Peter</description>
    <pubDate>Sat, 16 Feb 2008 20:25:04 GMT</pubDate>
    <dc:creator>Peter Kovacs 1.0rc</dc:creator>
    <dc:date>2008-02-16T20:25:04Z</dc:date>
    <item>
      <title>sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092917#M442698</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Executing the following command gives the error in the Subject:&lt;BR /&gt;&lt;BR /&gt;# su - a_user ls&lt;BR /&gt;&lt;BR /&gt;a_user can, of course, properly execute ls, when "logged in" via&lt;BR /&gt;&lt;BR /&gt;# su - a_user&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Peter</description>
      <pubDate>Sat, 16 Feb 2008 16:51:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092917#M442698</guid>
      <dc:creator>Peter Kovacs 1.0rc</dc:creator>
      <dc:date>2008-02-16T16:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092918#M442699</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;# su -a_user -c 'ls'&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Sat, 16 Feb 2008 17:08:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092918#M442699</guid>
      <dc:creator>Robert-Jan Goossens_1</dc:creator>
      <dc:date>2008-02-16T17:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092919#M442700</link>
      <description>Thanks, working fine.&lt;BR /&gt;&lt;BR /&gt;I just wonder how arguments with spaces can be then passed to su. Using perhaps double quotes?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Peter</description>
      <pubDate>Sat, 16 Feb 2008 19:33:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092919#M442700</guid>
      <dc:creator>Peter Kovacs 1.0rc</dc:creator>
      <dc:date>2008-02-16T19:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092920#M442701</link>
      <description>Hi Peter:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I just wonder how arguments with spaces can be then passed to su. Using perhaps double quotes?&lt;BR /&gt;&lt;BR /&gt;Yes.  For example:&lt;BR /&gt;&lt;BR /&gt;# su - a_user -c 'grep "RFC 1078" /etc/services|more'&lt;BR /&gt;&lt;BR /&gt;...or:&lt;BR /&gt;&lt;BR /&gt;# su - root  -c "grep 'RFC 1078' /etc/services|more"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 16 Feb 2008 20:17:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092920#M442701</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-02-16T20:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092921#M442702</link>
      <description>Let me press on about this. What if I want to pass a command with environment variable expansion onto su? I surely cannot use single quotes, can I?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Peter</description>
      <pubDate>Sat, 16 Feb 2008 20:25:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092921#M442702</guid>
      <dc:creator>Peter Kovacs 1.0rc</dc:creator>
      <dc:date>2008-02-16T20:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092922#M442703</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;Do you want use a variable from the current environment? &lt;BR /&gt;That's just normal substitution:&lt;BR /&gt;&lt;BR /&gt;$ export test="/tmp"&lt;BR /&gt;$ echo $test&lt;BR /&gt;/tmp&lt;BR /&gt;$ su - hein -c "ls $test"&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;Or do you want to use a variable as defined in the profile for the user switch to? Like a $ORA_HOME or such?&lt;BR /&gt;Then you have to make sure the ${symbol_name} is not picked up by the current shell. Two basic ways, as indicated before. Which one is best, depends on how many other variables are used:&lt;BR /&gt;&lt;BR /&gt;$ grep my_name ~hein/.profile&lt;BR /&gt;export my_name="Hein van den Heuvel"&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;$ su - hein -c 'echo "my name is " $my_name'&lt;BR /&gt;my name is  Hein van den Heuvel&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;$ su - hein -c "echo 'my name is ' \$my_name"&lt;BR /&gt;my name is  Hein van den Heuvel&lt;BR /&gt;:&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Feb 2008 21:34:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092922#M442703</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-02-16T21:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: sh: ls: Execute permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092923#M442704</link>
      <description>Use quotes as detailed in the respective replies to my questions.</description>
      <pubDate>Sat, 16 Feb 2008 22:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sh-ls-execute-permission-denied/m-p/5092923#M442704</guid>
      <dc:creator>Peter Kovacs 1.0rc</dc:creator>
      <dc:date>2008-02-16T22:42:51Z</dc:date>
    </item>
  </channel>
</rss>

