<?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 File permissions for created files in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70263#M7010</link>
    <description>When I use EG and save .sas program files or SAS data sets the default permissions created for them is 644 which means that other folks in the same group don't have write access. Is it possible to configure EG so files it creates use 664 instead?&lt;BR /&gt;
&lt;BR /&gt;
We've tried updating the user profiles to set a umask to allow this, but it appears that EG is ignoring that.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Don Henderson</description>
    <pubDate>Tue, 23 Mar 2010 16:27:41 GMT</pubDate>
    <dc:creator>DonH</dc:creator>
    <dc:date>2010-03-23T16:27:41Z</dc:date>
    <item>
      <title>File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70263#M7010</link>
      <description>When I use EG and save .sas program files or SAS data sets the default permissions created for them is 644 which means that other folks in the same group don't have write access. Is it possible to configure EG so files it creates use 664 instead?&lt;BR /&gt;
&lt;BR /&gt;
We've tried updating the user profiles to set a umask to allow this, but it appears that EG is ignoring that.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Don Henderson</description>
      <pubDate>Tue, 23 Mar 2010 16:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70263#M7010</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2010-03-23T16:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70264#M7011</link>
      <description>EGuide must run on Windows, but your comments make it look like the files are being stored in a Unix environment of some sort.  You probably need to work with your unix admin on how the unix-to-pc connection is made (Samba, NFS ?).</description>
      <pubDate>Tue, 23 Mar 2010 19:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70264#M7011</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-03-23T19:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70265#M7012</link>
      <description>Yes, EG is running on Windows - as part of an EBI environment where all the SAS data files and code are to be saved on the Unix server. The Unix admin has set things up so the default umask is 664. I have confirmed that works for a number of applications. But EG seems to not be using the default umask. So my question is how I tell EG to honor the profile information set for the user on Unix.</description>
      <pubDate>Tue, 23 Mar 2010 20:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70265#M7012</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2010-03-23T20:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70266#M7013</link>
      <description>Don, &lt;BR /&gt;
&lt;BR /&gt;
EG is using the IOM FileService to write the files into the UNIX server file system.  So it's the SAS process running on UNIX that is writing the file.  I guess I'd expect it to behave similar to writing a file you reference with a SAS fileref in a SAS program.&lt;BR /&gt;
&lt;BR /&gt;
We can look into how that behavior is affecting the umask.  I suggest working with tech support to help track the details.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 24 Mar 2010 12:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70266#M7013</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2010-03-24T12:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70267#M7014</link>
      <description>Wanted to close the loop with the solution provided by TS:&lt;BR /&gt;
===============&lt;BR /&gt;
The Unix file permissions of files created via an Enterprise Guide session are inherited from the userid that starts the Object Spawner process.  If you'd like to alter the file permissions for EG users that launch workspace server processes you'll need to add a umask command to the WorkspaceServer script, WorkspaceServer.sh.  This script is located in your configuration directory at:&lt;BR /&gt;
&lt;SASHOME&gt;/&lt;CONFIG&gt;/Lev1/SASApp/WorkspaceServer&lt;BR /&gt;
&lt;BR /&gt;
In your case you would add umask 113 to the script somewhere prior to the the following line:&lt;BR /&gt;
cmd="$SAS_COMMAND...&lt;BR /&gt;
&lt;BR /&gt;
Save the WorkspaceServer.sh script and restart the Object Spawner and any existing EG sessions.&lt;BR /&gt;
===============&lt;BR /&gt;
Assuming TS says OK, I will likely post this as a Tip of the Day on sasCommunity.org&lt;/CONFIG&gt;&lt;/SASHOME&gt;</description>
      <pubDate>Mon, 29 Mar 2010 15:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70267#M7014</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2010-03-29T15:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70268#M7015</link>
      <description>I also see this note on SAS support site that will make umask value effective for all workspace sessions  but what would be the solution when users need flexibility i.,e save files as 664 or 644 as required through EG? Is there any way to run Unix commands like chmod through EG as they are not unix savy ?</description>
      <pubDate>Mon, 28 Jun 2010 19:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70268#M7015</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-28T19:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70269#M7016</link>
      <description>Another option in SAS 9.2 to inherit the correct default umask:&lt;BR /&gt;
&lt;BR /&gt;
Add the lines:&lt;BR /&gt;
&lt;BR /&gt;
# Source Profile&lt;BR /&gt;
~/.profile&lt;BR /&gt;
&lt;BR /&gt;
in the file workspaceserver.sh. This is located in the config directory Lev1/SASApp/WorkSpaceServer.&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Tue, 29 Jun 2010 14:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/70269#M7016</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2010-06-29T14:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/289825#M19804</link>
      <description>&lt;P&gt;Macro to change the permissions of SAS Dataset:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro chmod(libname,dataset,permis=777);

  proc sql;
     /* get the absolute path of the libname */
     select path into: extpath from dictionary.members
       where libname="%UPCASE(&amp;amp;LIBNAME)";

     /* find out if there are any datasets in the library */
     select count(path) into: cnt from dictionary.members
       where libname="%UPCASE(&amp;amp;LIBNAME)";

     /* if there are datasets...then issue the below command to change the 
        permissions of the dataset called in this macro  to 777 */ 
     %if &amp;amp;cnt &amp;gt; 0 %then %do;
        filename chmod pipe "chmod &amp;amp;PERMIS %trim(&amp;amp;extpath)/&amp;amp;dataset..ssd01";
        data _null_;
          file chmod;
        run;
     %end;
%mend;



/* assign a libref to test the macro */
libname link '/local/u/sssims/sasuser612';

/* test the macro on the 'houses' dataset in the 'link' library */
%chmod(link,houses);&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/289825#M19804</guid>
      <dc:creator>avinashginjupal</dc:creator>
      <dc:date>2016-08-05T15:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696248#M37432</link>
      <description>&lt;P&gt;Am I understanding this correctly in that if you change the profile in script reference above that it will change the permissions for all users of EG?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is a problem in that we only want the permissions changed for specific users upon creating files - it seems like the default as one user noted is 644, we want 664 for selected users not everybody.&amp;nbsp; We want each user to be able to control this in their .bashrc with umask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that if I run code outside of EG (for example using XWindows program like Mobaxterm) directly on the Unix server, then it reads my umask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using chmod is impractical since we are creating many permanent files all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way - can individual users' umask be read by executing a script in EG code with a system command "X....."?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 16:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696248#M37432</guid>
      <dc:creator>larryrobert</dc:creator>
      <dc:date>2020-11-03T16:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696298#M37434</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/288050"&gt;@larryrobert&lt;/a&gt;&amp;nbsp; - Surely this would be easier and more reliable to implement via a special login profile for the SAS users that require it? I'm not familiar enough with Unix to suggest how to do this but a Unix administrator should be able to advise.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 19:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696298#M37434</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-03T19:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696302#M37435</link>
      <description>&lt;P&gt;In the WorkspaceServer_usermods.sh file, you can set the umask conditionally for certain users. When the shell script runs, the switch to the logged-in (via metadata) user has already been made (from the user that is running the object spawner).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The umask that you experience per default is the one from the userid running the object spawner.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 19:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/696302#M37435</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-03T19:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883556#M43265</link>
      <description>&lt;P&gt;This fixed our issue, just added umask 007 as we needed rw-rw---- permission.Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 12:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883556#M43265</guid>
      <dc:creator>sas_royal</dc:creator>
      <dc:date>2023-07-05T12:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883557#M43266</link>
      <description>Fixed the issue. Thanks.</description>
      <pubDate>Wed, 05 Jul 2023 12:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883557#M43266</guid>
      <dc:creator>sas_royal</dc:creator>
      <dc:date>2023-07-05T12:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: File permissions for created files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883558#M43267</link>
      <description>Fixed the issue.</description>
      <pubDate>Wed, 05 Jul 2023 12:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/File-permissions-for-created-files/m-p/883558#M43267</guid>
      <dc:creator>sas_royal</dc:creator>
      <dc:date>2023-07-05T12:56:53Z</dc:date>
    </item>
  </channel>
</rss>

