- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We've tried updating the user profiles to set a umask to allow this, but it appears that EG is ignoring that.
Thanks,
Don Henderson
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
We can look into how that behavior is affecting the umask. I suggest working with tech support to help track the details.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
===============
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:
In your case you would add umask 113 to the script somewhere prior to the the following line:
cmd="$SAS_COMMAND...
Save the WorkspaceServer.sh script and restart the Object Spawner and any existing EG sessions.
===============
Assuming TS says OK, I will likely post this as a Tip of the Day on sasCommunity.org
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the lines:
# Source Profile
~/.profile
in the file workspaceserver.sh. This is located in the config directory Lev1/SASApp/WorkSpaceServer.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Macro to change the permissions of SAS Dataset:
%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(&LIBNAME)"; /* find out if there are any datasets in the library */ select count(path) into: cnt from dictionary.members where libname="%UPCASE(&LIBNAME)"; /* if there are datasets...then issue the below command to change the permissions of the dataset called in this macro to 777 */ %if &cnt > 0 %then %do; filename chmod pipe "chmod &PERMIS %trim(&extpath)/&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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
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. We want each user to be able to control this in their .bashrc with umask.
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.
Using chmod is impractical since we are creating many permanent files all the time.
Is there any other way - can individual users' umask be read by executing a script in EG code with a system command "X....."?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@larryrobert - 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).
The umask that you experience per default is the one from the userid running the object spawner.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This fixed our issue, just added umask 007 as we needed rw-rw---- permission.Thank you so much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content