<?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: SetUID behavior in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035120#M431771</link>
    <description>Sript have owner ftpuser and group sys, but folder is with appsfcpa.dti. When you switch to user ftp your group is changed to dti and all is ok. &lt;BR /&gt;&lt;BR /&gt;Try to change group ownership of script to dti.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
    <pubDate>Tue, 20 Mar 2007 15:08:13 GMT</pubDate>
    <dc:creator>Ivan Krastev</dc:creator>
    <dc:date>2007-03-20T15:08:13Z</dc:date>
    <item>
      <title>SetUID behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035118#M431769</link>
      <description>Is this normal behavior?&lt;BR /&gt;We have the SetUID on a file, so we want users to run it, to run it as ftpuser.&lt;BR /&gt;&lt;BR /&gt;Like you can see, runing the whoami command shows it works, displaying ftpuser.&lt;BR /&gt;&lt;BR /&gt;Here's a few tests commands..&lt;BR /&gt;&lt;BR /&gt;[root@ACME /home/test/] ls -Fla test.sh&lt;BR /&gt;-rwsr-xr-x  1 ftpuser sys 49 Mar 20 16:24 test.sh*&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[root@ACME /home/test/] cat ./test.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;cd /userdisk/prod/msweb&lt;BR /&gt;pwd&lt;BR /&gt;whoami&lt;BR /&gt;&lt;BR /&gt;[root@ACME /home/test/] ./test.sh &lt;BR /&gt;./test.sh[2]: /userdisk/prod/msweb: Permission denied.&lt;BR /&gt;/home/test&lt;BR /&gt;ftpuser&lt;BR /&gt;&lt;BR /&gt;[root@HPUNIXA /home/test/] su ftpuser&lt;BR /&gt;[u@h /home/test/] cd /userdisk/prod/msweb&lt;BR /&gt;[u@h /userdisk/prod/msweb/] &lt;BR /&gt;&lt;BR /&gt;[u@h /userdisk/prod/msweb/] id ftpuser&lt;BR /&gt;uid=xxx(ftpuser) gid=xxx(dti)&lt;BR /&gt;&lt;BR /&gt;[root@ACME /userdisk/prod/] ls -Fla | grep msweb&lt;BR /&gt;drwxrws---   3 appsfcpa dti           96 Jul 28  2005 msweb/&lt;BR /&gt;&lt;BR /&gt;Is this normal behavior?&lt;BR /&gt;&lt;BR /&gt;Hope this is not too much confusing..&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Mar 2007 14:37:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035118#M431769</guid>
      <dc:creator>Marie-Josee Cormier</dc:creator>
      <dc:date>2007-03-20T14:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: SetUID behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035119#M431770</link>
      <description>This is a little hard to follow but /userdisk/prod/msweb does not have search permission for user ftpuser. Although the group permission allow group dti, you have only done a setuid not a setgid. Set both the setuid and setgid bits on your script. &lt;BR /&gt;&lt;BR /&gt;I must say that setuid scripts are something that should really, really be avoided because they are a security hole you can drive a truck through. This is the sort of thing that is much better done with sudo or at least a setuid C program. I don't allow setuid scripts on any of my boxes and on those OS versions where setuid scripts can be disabled in the kernel, I disable them.</description>
      <pubDate>Tue, 20 Mar 2007 15:03:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035119#M431770</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-20T15:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: SetUID behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035120#M431771</link>
      <description>Sript have owner ftpuser and group sys, but folder is with appsfcpa.dti. When you switch to user ftp your group is changed to dti and all is ok. &lt;BR /&gt;&lt;BR /&gt;Try to change group ownership of script to dti.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Tue, 20 Mar 2007 15:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035120#M431771</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2007-03-20T15:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: SetUID behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035121#M431772</link>
      <description>Ok, sorry for the unclear post.&lt;BR /&gt;&lt;BR /&gt;I though than when a script was executed with a SetUID, you were inheriting is group security as well.&lt;BR /&gt;&lt;BR /&gt;Maybe I should explain what we wanted to do.  We often need to transfer files to different ftp sites.  We wanted those ftp sites access(user and pass) to remain secret even to user who executed those scripts.&lt;BR /&gt;&lt;BR /&gt;So we created a .netrc file on our ftpuser user, wich contains a database of ftp sites, users and pass.&lt;BR /&gt;&lt;BR /&gt;So when executing the putftp script, it was run as this ftpuser.&lt;BR /&gt;&lt;BR /&gt;Sounds more complex than it is, i'm just not good at puting idea on text! : )&lt;BR /&gt;&lt;BR /&gt;Anyway, thanks for your help, i'll look for another way.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Mar 2007 07:01:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035121#M431772</guid>
      <dc:creator>Marie-Josee Cormier</dc:creator>
      <dc:date>2007-03-21T07:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: SetUID behavior</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035122#M431773</link>
      <description>Ok, I now understands SetUID better.  It runs as the owner of the script, but the group security is still the executer of the script.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 21 Mar 2007 07:17:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-behavior/m-p/5035122#M431773</guid>
      <dc:creator>Marie-Josee Cormier</dc:creator>
      <dc:date>2007-03-21T07:17:51Z</dc:date>
    </item>
  </channel>
</rss>

