BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
asumsie
Obsidian | Level 7

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.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

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

View solution in original post

9 REPLIES 9
Timmy2383
Lapis Lazuli | Level 10
Does the General Servers account (usually sassrv, you can find out on the Accounts tab for General Servers metadata group) have access to the library?

I would check the permissions of the folder/library on the OS and see if sassrv has access to it.
asumsie
Obsidian | Level 7

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.

 

Timmy2383
Lapis Lazuli | Level 10
Well you need to determine if it's a metadata security issue or an OS security issue.

Easiest way to find out is to check permissions of the folder on server and then see if sassrv would have access to that folder.

Check security for the folder:

ls -l /path/to/libname/dir

Check groups of sassrv account:
groups sassrv
asumsie
Obsidian | Level 7

Is there a Windows equivelent to the ls -l command?  I forgot to mention originally we are running Windows, not *nix.

Timmy2383
Lapis Lazuli | Level 10

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?

Kurt_Bremser
Super User

@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.

asumsie
Obsidian | Level 7

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.

 

asumsie
Obsidian | Level 7

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.

 

 

Kurt_Bremser
Super User

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 29935 views
  • 1 like
  • 3 in conversation