Desktop productivity for business analysts and programmers

Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Reply
Contributor
Posts: 71

Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Dear SAS Experts,

 

what is it about those folders that I see under my SASApp Server connection just under Libraries called

Files\bin and Files\sasuser v.94?

I just created a xlsx file the following way:

 

proc export

  data=sashelp.prdsale

  dbms=xlsx

  outfile="temp_output/test.xlsx"

  replace;

run;

Log:;

"/opt/sas/config/Lev1/SASApp/temp_output/test.xlsx"

 

I cant see those files in EG and was hoping that Files\bin and Files\sasuser v.94 would be a possible destination where I can actually see the XLSX generated. Are Files\bin and Files\sasuser v.94 are possible desintations for such file generation or are those two locations something completely different?

 

Super User
Posts: 7,412

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

[ Edited ]

Since the SAS code executes in the workspace server on the UNIX host, it "sees" the UNIX filesystem of the server, which

- is completely detached from your desktop

- follows other syntax (most notably the use of / for directory separation instead of the \, and being completely case sensitive)

 

The Files section in your EG server list corresponds to the home directory of the user running the workspoace server.

 

Don't use sasuser.94 or bin, as those are meant for specific files only (the SASUSER library and individual UNIX executables)

Create a new folder in Files (RMB on Files), and then specify that as

$HOME/foldername

$HOME is a UNIX environment variable that points to your home directory.

 

Since you were able to write to the SAS configuration tree at all, your SAS administrator has commited a grave error. Users other than the SAS install user must not be permitted to write there.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 2

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Dear Kurt,

 

Thanks for your hints. I am an administrator of Philips SAS environment.

 

First of all: Of Course you are right about the permissions. However, I gave Philip (my personal trusted user ;-) nearly all rights to test different things. Other users cannot write there.

 

Back to topic: We just implemented our SAS Environment. Therefore, we are doing first steps, testing some things (and making some mistakes ;-).  We have created meta folders by the help of the SAS Management Console. Our goal is to save the output to one of these directories. Obviously, we can only save the output to the home directory of the user or areas of the server that no one else is allowed to access.

 

Is there a way to save the output to shared meta folders?

 

Thanks in advance for your help.

Trusted Advisor
Posts: 1,182

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Hi Michel,

 

the first steps on setting a new environment are always a challenge, but also nice and thrilling Smiley Happy

 

About permissions, besides OS permissions, you can set up filelocks easily for the users: http://support.sas.com/documentation/cdl/en/hostunx/67929/HTML/default/viewer.htm#n1824lspl1ny8gn1f6... , or lockdown, even better, http://support.sas.com/documentation/cdl/en/biasag/63854/HTML/default/viewer.htm#n23000intelplatform..., but probably you have this covered already by OS permissions. Perfect for protecting paths from SAS, very recommended because it has no impact on the OS itself, just on the SAS application level.

 

Also, you might want to give a look on the configuration of your Workspace server file path. This configuration can make huge differences on where the users will have theyr root folder when writting data with relative paths.


And about your question on the shared metadata folders: you code is writting to a OS folder, not a metadata folder, keep this in mind. But I guess your question was about an OS folder, not a metadata folder: for this, please come back to the Workspace server file path. This allows you to set a root folder with permissions to all the sas users. Or, the users can use an absolute path that has r/w permissions to the sas users group.

 

 

 

New Contributor
Posts: 2

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Dear Juan,

 

Thanks for your advices, especially for the the filelocks!

 

Actually I want to provide an opportunity for users to share outputs elements in directories. So the output Files should be visible in the SEG file explorer for every user, who is connected to the server and has the permission to see the file.

 

According to your advice, I will create an output folder within the WORK directory and set the rights on this directory correctly as the first step for the solution. The second step you mentioned is to set this folder as absolute path for the output. But how can users refer to this special OS folder within their code?

 

Thanks a lot for your advices!

Super User
Posts: 7,412

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

Be careful with using directories under your current WORK location. This location is transient and will vanish completely once the SAS process shuts down (most often, the workspace server). And SAS usually restricts access to the root work directory for a given process to the user of the process, so others can't look there.

 

So, the first thing you have to do is create a suitable directory in a location in the server's filesystem where all users you want to include have at least read/execute permissions. Then create a library reference that is somehow "permanent". This may be in the SAS metadata, or in  the autoexec_usermods.sas file of your workspace server, or in the autoexec_usermods.sas of your SASApp. You can create the library defintion in the SAS Enterprise Guide Explorer.

If you want to share files other than SAS datasets in the Files section of the EG server list, this will become trickier.

By default, Files (in EG) is located in the home directory of the user (on the UNIX level, you find this in the environment variable $HOME). This is an attribute of the workspace server definition in the metadata, and I would not change that for several reasons.

My workaround for this is that I create a symbolic link in all user's home directories that points to the shared location. They can then see the files in Files.

Keep in mind that in the code, access to locations is only restricted by file system permissions, so basically users can "see" the whole system, starting at the root.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 7,412

Re: Unix Server & EG 7.1 SASApp\Files\bin and \sasuser v.94

[ Edited ]

Folders in the metadata are for metadata, not data. They are virtual places in the metadata repository. Storing data there would blow up the repository to a size where the metadata server would simply stop working because of overload.

So you can store dataset registrations or library definitions and similar there, but for everything else you need storage.

(Enterprise Guide projects can be stored in metadata, but the SAS metadata server actually uses webdav and a location in the filesystem for the projects themselves; metadata only contains the reference)

 

As I already stated: NO user aside from the SAS install user should be able to write anything into the SAS configuration tree, not even your trusted personal superuser. One tiny error and you have your SAS setup trashed.

 

If you want to share output datasets, you need to create directories in the filesystem where all respective users are granted write permission (most easily done by setting write permission for the owning group, and assigning the users to this group), and define libraries for them.

 

Edited some typos

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 6 replies
  • 491 views
  • 6 likes
  • 4 in conversation