<?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,setgid,stickybit in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464044#M210585</link>
    <description>hi,&lt;BR /&gt; &lt;BR /&gt;one yet uncovered feature of setgid:&lt;BR /&gt; &lt;BR /&gt;if you are owner of a directory or if you are root, then you can create a subdirectory and execute "chmod g+s subdir".&lt;BR /&gt;All files created in this subdirectory will then inherit the group of the subdirectory.&lt;BR /&gt; &lt;BR /&gt;#id&lt;BR /&gt;uid=1000(user) gid=101(users)&lt;BR /&gt;#mkdir subdir&lt;BR /&gt;#ll -d subdir&lt;BR /&gt;drwxr-xr-x  2 user   users   96 Jan 17 07:43 subdir&lt;BR /&gt;#touch subdir/before&lt;BR /&gt;#chgrp testgrp subdir&lt;BR /&gt;#chmod g+s subdir&lt;BR /&gt;#touch subdir/after&lt;BR /&gt;#ll subdir&lt;BR /&gt;-rw-r--r--   1 user  tstgrp  0 Jan 17 07:45 after&lt;BR /&gt;-rw-r--r--   1 user  users   0 Jan 17 07:45 before&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;Thierry Poels.&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Jan 2005 01:47:33 GMT</pubDate>
    <dc:creator>Thierry Poels_1</dc:creator>
    <dc:date>2005-01-17T01:47:33Z</dc:date>
    <item>
      <title>setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464038#M210579</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Could anyone, explain setuid,setgid,stickybit in hpux with examples&lt;BR /&gt;&lt;BR /&gt;thanks in advance.&lt;BR /&gt;&lt;BR /&gt;tar&lt;BR /&gt;siva</description>
      <pubDate>Sun, 16 Jan 2005 09:41:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464038#M210579</guid>
      <dc:creator>sjana</dc:creator>
      <dc:date>2005-01-16T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464039#M210580</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;From the HP Certified Book&lt;BR /&gt;&lt;BR /&gt;setuid and setgid plays an important role when you want to execute a programm with higher priviliges. For example, when you change your passwd you modify /etc/passwd. Only root has permission to modify this. This is possible because the command /bin/passwd has the setuid bit set (chmod u+s /bin/passwd). So whenever a user issues the command, it runs as root&lt;BR /&gt;&lt;BR /&gt;stickybit&lt;BR /&gt;&lt;BR /&gt;represented by 't' and is set using the chmod u+t command&lt;BR /&gt;&lt;BR /&gt;The use for the sticky bit for directories has a significant advantage. If the sticky bit for the directory area is set, users can use that area as a public area for file sharing. Any file present in a directory with the sticky bit set can only be deleted by the owner. It may be useful to set the sticky bit for /tmp where users can safely put and delete temporary or sharable files&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Sun, 16 Jan 2005 10:11:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464039#M210580</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2005-01-16T10:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464040#M210581</link>
      <description>hi steven Burgess,&lt;BR /&gt;&lt;BR /&gt;Thanks for your notes,&lt;BR /&gt;&lt;BR /&gt;Could you pls. explain how to set setuid &amp;amp; setgid &amp;amp; sticky bit for a user/group/file using commands&lt;BR /&gt;&lt;BR /&gt;tar&lt;BR /&gt;siva</description>
      <pubDate>Sun, 16 Jan 2005 10:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464040#M210581</guid>
      <dc:creator>sjana</dc:creator>
      <dc:date>2005-01-16T10:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464041#M210582</link>
      <description>These examples use symbolic notation.  Some prefer to use octal (numbers) notation, but I feel symbolic notation for chmod is more useful for the learner (and easier for my dyxlexic brain to remember!).  To set the sticky bit on /tmp, making it so only the owner or superuser can delete files:&lt;BR /&gt;&lt;BR /&gt;chmod +t /tmp&lt;BR /&gt;&lt;BR /&gt;ls -ld /tmp&lt;BR /&gt;&lt;BR /&gt;drwxrwxrwt ... /tmp&lt;BR /&gt;&lt;BR /&gt;To make your newly compiled sudo command imitate root:&lt;BR /&gt;&lt;BR /&gt;chmod o+s /home/src/sudo-1.6/sudo&lt;BR /&gt;&lt;BR /&gt;ls -l /home/src/sudo-1.6/sudo&lt;BR /&gt;&lt;BR /&gt;-rwsr-xr-x ... root sys ... sudo&lt;BR /&gt;&lt;BR /&gt;To make your Netscape command setgid so only "browser" group members can run it (there's probably more required to actually implement this fully):&lt;BR /&gt;&lt;BR /&gt;chmod g+s /opt/netscape/bin/netscape&lt;BR /&gt;&lt;BR /&gt;ls -l /opt/netscape/bin/netscape&lt;BR /&gt;&lt;BR /&gt;-rwxr-s--- ... apps  browser ... netscape&lt;BR /&gt;&lt;BR /&gt;Have fun,&lt;BR /&gt;Mic&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 16 Jan 2005 12:36:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464041#M210582</guid>
      <dc:creator>Mic V.</dc:creator>
      <dc:date>2005-01-16T12:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464042#M210583</link>
      <description>Since setuid and setgid have been already covered&lt;BR /&gt;in the previous replies, I will not repeate that.&lt;BR /&gt;&lt;BR /&gt;The sticky bit has 2 purposes depending on the file&lt;BR /&gt;type (a regular binary file or a directory file). Setting&lt;BR /&gt;the sticky bit for a binary is a way of telling the &lt;BR /&gt;unix kernel that the binary will be executed frequently (like, for example, a populat editor like&lt;BR /&gt;"vi"). So the kernel would keep this file in the swap &lt;BR /&gt;space and the subsequent invocation of this&lt;BR /&gt;program would be quick. If sticky bit is set for a&lt;BR /&gt;directory, all users can have read/write permission&lt;BR /&gt;on all files in that directory; but only the owner &lt;BR /&gt;can remove/rename the file. And, ofcourse, only&lt;BR /&gt;root can turn on the sticky bit.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Sun, 16 Jan 2005 14:52:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464042#M210583</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-01-16T14:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464043#M210584</link>
      <description>The sticky bit did keep "text" in memory for faster execution back around 4.3 BSD.  But I thought I'd read that this usage had been dropped...maybe it was another version of UNIX.  At any rate, the HP man pages say:&lt;BR /&gt;&lt;BR /&gt;"If an executable file is prepared for sharing, mode bit S_ISVTX prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Then, when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, thus saving time.&lt;BR /&gt;&lt;BR /&gt;If the mode bit S_ISVTX (sticky bit) is set on a directory, files inside the directory may be renamed or removed only by the owner of the file, the owner of the directory, or the superuser (even if the modes of the directory would otherwise allow such an operation)."&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60103/chmod.2.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60103/chmod.2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for pointing out that it's still around.</description>
      <pubDate>Sun, 16 Jan 2005 16:32:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464043#M210584</guid>
      <dc:creator>Mic V.</dc:creator>
      <dc:date>2005-01-16T16:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464044#M210585</link>
      <description>hi,&lt;BR /&gt; &lt;BR /&gt;one yet uncovered feature of setgid:&lt;BR /&gt; &lt;BR /&gt;if you are owner of a directory or if you are root, then you can create a subdirectory and execute "chmod g+s subdir".&lt;BR /&gt;All files created in this subdirectory will then inherit the group of the subdirectory.&lt;BR /&gt; &lt;BR /&gt;#id&lt;BR /&gt;uid=1000(user) gid=101(users)&lt;BR /&gt;#mkdir subdir&lt;BR /&gt;#ll -d subdir&lt;BR /&gt;drwxr-xr-x  2 user   users   96 Jan 17 07:43 subdir&lt;BR /&gt;#touch subdir/before&lt;BR /&gt;#chgrp testgrp subdir&lt;BR /&gt;#chmod g+s subdir&lt;BR /&gt;#touch subdir/after&lt;BR /&gt;#ll subdir&lt;BR /&gt;-rw-r--r--   1 user  tstgrp  0 Jan 17 07:45 after&lt;BR /&gt;-rw-r--r--   1 user  users   0 Jan 17 07:45 before&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;Thierry Poels.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jan 2005 01:47:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464044#M210585</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2005-01-17T01:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: setuid,setgid,stickybit</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464045#M210586</link>
      <description>Two other tiny points that are worth noting are:&lt;BR /&gt;&lt;BR /&gt;Files can be SGID/SUID and not executable and in this case they show as:&lt;BR /&gt;&lt;BR /&gt;rwSrwSr-- myfile&lt;BR /&gt;&lt;BR /&gt;When a shell script has the SUID bit set (and it belongs to a privileged user such as root), the SUID is not honoured and the script executes with normal privileges.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jan 2005 03:45:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/setuid-setgid-stickybit/m-p/3464045#M210586</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2005-01-17T03:45:04Z</dc:date>
    </item>
  </channel>
</rss>

