Get all users permission to a file

140
1
05-25-2020 10:30 PM
ModyBuchbinder
Esri Regular Contributor

Hello all

This question have nothing to do with GIS but I hope somebody will help.

I need to find the permission of all users for a file/directory. You get this in Windows by opening the file properties and select the security tab.

I can use os.access to get my permissions but I need the other users/groups too.

I could not find any way to do it with basic python libraries (or with the libraries that comes in Pro).

Is there any way to do it with the basic libraries or do you need some external library and which one?

Thanks

0 Kudos
1 Reply
JoshuaBixby
MVP Esteemed Contributor

The simplest, or least code, approach would be to call icacls | Microsoft Docs using subprocess — Subprocess management — Python 3.8.3 documentation 

0 Kudos