<?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: umask in scripts. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851751#M93776</link>
    <description>Hi Brian:&lt;BR /&gt;&lt;BR /&gt;As required, set it the way you want in your script:&lt;BR /&gt;&lt;BR /&gt;# umask 027&lt;BR /&gt;&lt;BR /&gt;For directories, you could do something like: &lt;BR /&gt;&lt;BR /&gt;# mkdir -m 750 /tmp/mydir&lt;BR /&gt;&lt;BR /&gt;Note in the above that a 'mkdir' yields the same permissions with either form when 'umask' as set as shown.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 25 Nov 2002 21:50:31 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2002-11-25T21:50:31Z</dc:date>
    <item>
      <title>umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851747#M93772</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;  How do you handle umask in scripts? Any tips welcome.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Brian.</description>
      <pubDate>Mon, 25 Nov 2002 21:35:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851747#M93772</guid>
      <dc:creator>brian_31</dc:creator>
      <dc:date>2002-11-25T21:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851748#M93773</link>
      <description>Brian,&lt;BR /&gt;&lt;BR /&gt;Can you be more specific?.&lt;BR /&gt;&lt;BR /&gt;I don't pay much attention to umask as the script will run in a new shell. If I need the umask from the script to the current shell, then I will dot (.) in the script.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Mon, 25 Nov 2002 21:43:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851748#M93773</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-11-25T21:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851749#M93774</link>
      <description>umask can be handled just like any other environment variable.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;umask 022&lt;BR /&gt;&lt;BR /&gt;If I wanted to change the default mask of root for example I will change the umask in the script. If I don't I leave it alone and it will pick up the default of the user running it.</description>
      <pubDate>Mon, 25 Nov 2002 21:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851749#M93774</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-11-25T21:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851750#M93775</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Do you mean, how do you set it in a script?  Just do a 'umask 027' and that should set it for the duration of your script.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Nov 2002 21:44:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851750#M93775</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2002-11-25T21:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851751#M93776</link>
      <description>Hi Brian:&lt;BR /&gt;&lt;BR /&gt;As required, set it the way you want in your script:&lt;BR /&gt;&lt;BR /&gt;# umask 027&lt;BR /&gt;&lt;BR /&gt;For directories, you could do something like: &lt;BR /&gt;&lt;BR /&gt;# mkdir -m 750 /tmp/mydir&lt;BR /&gt;&lt;BR /&gt;Note in the above that a 'mkdir' yields the same permissions with either form when 'umask' as set as shown.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 25 Nov 2002 21:50:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851751#M93776</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-11-25T21:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851752#M93777</link>
      <description>I handle it something like this:&lt;BR /&gt;&lt;BR /&gt;SAVEMASK=$(umask 007)&lt;BR /&gt;echo "This is a test" &amp;gt; myfile&lt;BR /&gt;# restore to original value for following commands&lt;BR /&gt;umask ${SAVEMASK} &amp;gt; /dev/null &lt;BR /&gt;</description>
      <pubDate>Mon, 25 Nov 2002 22:02:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851752#M93777</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-11-25T22:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: umask in scripts.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851753#M93778</link>
      <description>If a script must create files with specific permissions, do not rely on the inherited umask value being acceptable. In particular, take care with scripts that you intend the root user to run. I've seen root umasks of 0, leaving files and directories wide open.</description>
      <pubDate>Fri, 29 Nov 2002 11:53:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/umask-in-scripts/m-p/2851753#M93778</guid>
      <dc:creator>Benedict Adamson</dc:creator>
      <dc:date>2002-11-29T11:53:18Z</dc:date>
    </item>
  </channel>
</rss>

