Your SAS programs, embedded in web apps and elsewhere

ERROR: User does not have appropriate authorization level for library XYZ

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

ERROR: User does not have appropriate authorization level for library XYZ

[ Edited ]

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.

 

 

 

 

 


Accepted Solutions
Solution
‎02-09-2017 07:28 PM
Super User
Posts: 7,771

Re: ERROR: User does not have appropriate authorization level for library XYZ

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

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Regular Contributor
Posts: 172

Re: ERROR: User does not have appropriate authorization level for library XYZ

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.
Contributor
Posts: 22

Re: ERROR: User does not have appropriate authorization level for library XYZ

Posted in reply to Timmy2383

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.

 

Regular Contributor
Posts: 172

Re: ERROR: User does not have appropriate authorization level for library XYZ

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
Contributor
Posts: 22

Re: ERROR: User does not have appropriate authorization level for library XYZ

Posted in reply to Timmy2383

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

Regular Contributor
Posts: 172

Re: ERROR: User does not have appropriate authorization level for library XYZ

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?

Super User
Posts: 7,771

Re: ERROR: User does not have appropriate authorization level for library XYZ


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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 22

Re: ERROR: User does not have appropriate authorization level for library XYZ

Posted in reply to KurtBremser

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.

 

Contributor
Posts: 22

Re: ERROR: User does not have appropriate authorization level for library XYZ

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.

 

 

Solution
‎02-09-2017 07:28 PM
Super User
Posts: 7,771

Re: ERROR: User does not have appropriate authorization level for library XYZ

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

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 1557 views
  • 0 likes
  • 3 in conversation