I have a stored process where I have a libname statement to a folder with SAS datasets. This libname statement works fine when run locally and also within Enterprise Guide, however, I recieve the following error when using it in a stored process.
libname XYZ '//my_server/my_folder';
ERROR: User does not have appropriate authorization level for library XYZ
ERROR: Error in the LIBNAME statement.
How do I go about troubleshooting why I don't have access to this library just when running as a SP? I already went through the historical posts, which is where I found about testing if I could access it within EG, which I can, but I couldn't find much else that seemed relevant to my case. The user guides I reviewed mostly went through establishing pre-defined libraries and setting permissions, rather than troubleshooting permissions for non-pre-defined libraries. Thanks.
Running Windows environment.
To check if OS permissions are correctly set:
- log on to the server as sassrv via SSH
(if that is not possible, have someone with superuser privileges switch to sassrv with su - sassrv)
- cd to the directory where the libname is to be assigned
- if that works, do a ls -l
- if that also works, copy one of the dataset files to a temp location (this verifies you can read the dataset)
If assigning the library worked (as I assume from one of your last posts, as proc datasets already worked), but proc contents did not work, then you will have problems with the permissions of the individual datasets. Make sure that
- either read permission is set for "others" on the files
- or sassrv is made a member of the owning group of the files, and read permission for the group is set
Since I can succesfully assign the library in EG (Tools > Assign Project Library) , aren't the OS permissions OK? The server it runs through is SASApp.
If possible, I'd prefer a solution that works through the SAS Management Console.
Is there a Windows equivelent to the ls -l command? I forgot to mention originally we are running Windows, not *nix.
Oh, ok. Permissions will work differently, then. I'm more a *nix person.
I guess you could right-click on the folder and check the groups and accounts that have access. Then check to see if <DOMAIN>\sassrv account is in a group that has read/lis/traverse access?
@asumsie wrote:
Since I can succesfully assign the library in EG (Tools > Assign Project Library) , aren't the OS permissions OK? The server it runs through is SASApp.
If possible, I'd prefer a solution that works through the SAS Management Console.
The stored process server runs from the system account sassrv, the workspace server (used by EG) from your personal system account. So you have to make sure that sasrv has the necessary permissions.
Thanks for the clarification on which account is running.
The IT department added sassrv@<OUR.SERVER> to the permissions list of those with read access to the target folder. However, I am still recieving the same error message.
I also tried adding a metadata library, pointing to the same folder. However, while the library shows up in dictionary.members and I can see the member datasets with PROC DATASETS, PROC CONTENTS fails as does trying to access one of the datasets in a data step.
Since the error just references "User" - I was curious if I could identify the actual user name it is attempting to use.
Let me know if I should be looking somewhere else, but I have gone into the SAS Management Console and under:
Server Manager > SASApp > SASApp - Logical Stores Process Server > SASApp - Stored Process Server > Properties > Options
The multiuser credentials is: "<COMPANY NAME>\sassrv (DefaultAuth)"
So it does look like my company is using the default sassrv user name.
To check if OS permissions are correctly set:
- log on to the server as sassrv via SSH
(if that is not possible, have someone with superuser privileges switch to sassrv with su - sassrv)
- cd to the directory where the libname is to be assigned
- if that works, do a ls -l
- if that also works, copy one of the dataset files to a temp location (this verifies you can read the dataset)
If assigning the library worked (as I assume from one of your last posts, as proc datasets already worked), but proc contents did not work, then you will have problems with the permissions of the individual datasets. Make sure that
- either read permission is set for "others" on the files
- or sassrv is made a member of the owning group of the files, and read permission for the group is set
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.