BookmarkSubscribeRSS Feed
DartRodrigo
Lapis Lazuli | Level 10

Hi experts,

 

I'm using unix environment.

 

Is there a shell command to list all groups or users that have access to a specific location or file ?

 

ls -l does not work for me, because i need all users that can read from that directory.

 

Thanks in advance

3 REPLIES 3
Kurt_Bremser
Super User

ls -l is the primary tool for this. It shows you the permissions for the owner, the group and all others.

On top of that, you may have an access control list (ACL) defined. On AIX, one uses aclget to retrieve that information.

This is all you need for determining access to a directory/file.

 

To display members of a group, use the lsgroup command.

DartRodrigo
Lapis Lazuli | Level 10

I need to show groups per folder/directory.

 

For example:

 

staff | /prod/crm

controlm | /prod/bi

 

Thanks

Kurt_Bremser
Super User

If "others" have read permission, everybody has access. If not, but the group has read permission, then all members of this group have access. If neither, only the owner has access. That's it. Unless you have defined ACL's.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 3 replies
  • 2039 views
  • 0 likes
  • 2 in conversation