<?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 Umask Question. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776699#M76186</link>
    <description>Hi Team:&lt;BR /&gt;&lt;BR /&gt;  We are going to set up umask of 022 in /etc/profile But we have some applications write to /var/tmp and some to /opt/data. The files/directories under these directories should worl writable. &lt;BR /&gt;1. How would i achieve this&lt;BR /&gt;2. How are the umask for startup scripts controlled. I have particular doubt about swagentd.( i think most of them are from /sbin/rc, but some set thier own umask  ...like inetd. what is the purpose of that)?&lt;BR /&gt;&lt;BR /&gt;Any thoughts???&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Brian.</description>
    <pubDate>Wed, 31 Jul 2002 14:04:58 GMT</pubDate>
    <dc:creator>brian_31</dc:creator>
    <dc:date>2002-07-31T14:04:58Z</dc:date>
    <item>
      <title>Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776699#M76186</link>
      <description>Hi Team:&lt;BR /&gt;&lt;BR /&gt;  We are going to set up umask of 022 in /etc/profile But we have some applications write to /var/tmp and some to /opt/data. The files/directories under these directories should worl writable. &lt;BR /&gt;1. How would i achieve this&lt;BR /&gt;2. How are the umask for startup scripts controlled. I have particular doubt about swagentd.( i think most of them are from /sbin/rc, but some set thier own umask  ...like inetd. what is the purpose of that)?&lt;BR /&gt;&lt;BR /&gt;Any thoughts???&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Brian.</description>
      <pubDate>Wed, 31 Jul 2002 14:04:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776699#M76186</guid>
      <dc:creator>brian_31</dc:creator>
      <dc:date>2002-07-31T14:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776700#M76187</link>
      <description>The application can set its own umask value.  All scripts can be set this way by invoking the umask command.  If the application runs with a specific account the profile can be changed for that account.  We will need to know how the application starts to determine how the umask can be changed.&lt;BR /&gt;&lt;BR /&gt;Your startup scripts may have a umask value in them or the application may be coded with a change of umask value in it.</description>
      <pubDate>Wed, 31 Jul 2002 14:12:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776700#M76187</guid>
      <dc:creator>Daimian Woznick</dc:creator>
      <dc:date>2002-07-31T14:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776701#M76188</link>
      <description>Hi Brian&lt;BR /&gt;&lt;BR /&gt;Each process or aplication that start's in the rc has its own shell&lt;BR /&gt;&lt;BR /&gt;Set the apropiate umask for each of this in the /sbin/init.t/script&lt;BR /&gt;&lt;BR /&gt;Then set the umask 022 in the /etc/profile or in the $HOME/.profile for each user that you want&lt;BR /&gt;&lt;BR /&gt;Joaquin</description>
      <pubDate>Wed, 31 Jul 2002 14:16:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776701#M76188</guid>
      <dc:creator>ASSIST</dc:creator>
      <dc:date>2002-07-31T14:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776702#M76189</link>
      <description>HI&lt;BR /&gt;If you know which applications (ID) need differnet UMASK, you can use IF..THEN..ELSE structure in /etc/profile do define different UMASK for different users.&lt;BR /&gt;You may set the UMASK in users .profile also.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;Prashant.</description>
      <pubDate>Wed, 31 Jul 2002 14:17:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776702#M76189</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2002-07-31T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776703#M76190</link>
      <description>You have to handle the non-typical file creations as a special case.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;savemask=$(umask 000)&lt;BR /&gt;echo "Test" &amp;gt; /var/tmp/myfile&lt;BR /&gt;umask $savemask #resets umask to original value&lt;BR /&gt;(You could also simply do a chmod after creating the file and forget about umask.)&lt;BR /&gt;&lt;BR /&gt;To answer your second question, scripts set their own umasks according to their own needs. This is most often done so that no matter how tightly or loosely umask is set in /etc/profile, the application will perform as expected because umask has been overridden.&lt;BR /&gt;&lt;BR /&gt;One important point is that there are two masks that need to be considered when files are created. 1) The creation mask 2) umask - which clears bits set in cmask. Man 2 creat for details.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 14:19:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776703#M76190</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-31T14:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776704#M76191</link>
      <description>Team:&lt;BR /&gt;&lt;BR /&gt;  Any indea how the swagentd gets it umask set for those .sw directory?? Also in clay's message i did not understand the cmask???&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Brian.</description>
      <pubDate>Wed, 31 Jul 2002 17:48:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776704#M76191</guid>
      <dc:creator>brian_31</dc:creator>
      <dc:date>2002-07-31T17:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776705#M76192</link>
      <description>Hi Brian,&lt;BR /&gt;&lt;BR /&gt; Simply put, the cmask is the "deafult" perms assigned to the file being created UNTIL the umask overrides those perms....or doesn't....whatever the case may be.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 31 Jul 2002 18:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776705#M76192</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-07-31T18:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776706#M76193</link>
      <description>&lt;BR /&gt;Hi Brian:&lt;BR /&gt;&lt;BR /&gt;cmask is the file's creation mask. I suggested that you do a man 2 creat to see what I'm talking about. If you really want to 'know' how something works in UNIX, look at the system calls because ultimately that's how a file creation is going to occur whether initiated from a shell script, Perl, or a COBOL/C/FORTRAN ... program.&lt;BR /&gt;&lt;BR /&gt;In the shell, the default cmask for directories is 777, and for regular files it is 666. Now the bits in umask subtract from the cmask to leave the actual permissions. Have you noticed when you create shell scripts that you have to set the execute bit manually using chmod even if your umask is 000? That's because your script is a regular file and the default cmask is 666. &lt;BR /&gt;&lt;BR /&gt;In C, for example, you can directly set the file's mode when you create the file.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 18:09:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776706#M76193</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-31T18:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776707#M76194</link>
      <description>As to swagentd &amp;amp; umasks there, take a look in /usr/sbin at the sw???? commands, most are all linked as one or two programs. If you do the following:&lt;BR /&gt;strings swinstall | grep -i mask&lt;BR /&gt;you'll see that it uses many calls to mask functions.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 31 Jul 2002 18:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776707#M76194</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-07-31T18:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Umask Question.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776708#M76195</link>
      <description>Thanks Jeff:&lt;BR /&gt;&lt;BR /&gt;But the sigprocmask and the other stuff mentioned there are quite irrelevant to umask is it not. Anyway i could not make out much from that info(strings swinstall|grep -i mask). Can you explain a little further...&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Brian.</description>
      <pubDate>Wed, 31 Jul 2002 19:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-question/m-p/2776708#M76195</guid>
      <dc:creator>brian_31</dc:creator>
      <dc:date>2002-07-31T19:36:38Z</dc:date>
    </item>
  </channel>
</rss>

