Display NTFS permissions list with option to print & export

Features wanted...
Post Reply
substorm
Posts: 16
Joined: 15 Jul 2014 04:13

Display NTFS permissions list with option to print & export

Post by substorm »

Hello,

Not sure how many people ran into this, but I constantly have to check NTFS permissions of shared folders and windows explorer doesn't have any way to export/print them. Also, the security tab window is so small that taking a screenshot doesn't work well if there are more than 15 lines or so. In addition to printing, having the option to save to tab delimited TXT or CSV would be amazing.
Please let me know what you think?

TIA

highend
Posts: 14568
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Display NTFS permissions list with option to print & exp

Post by highend »

Iirc nothing that XY can provide by itself. You could either call e.g. cacls.exe in a XY script and format the output as you like or you call e.g. a VBscript like http://www.codeproject.com/Articles/117 ... e-ACL-List
One of my scripts helped you out? Please donate via Paypal

substorm
Posts: 16
Joined: 15 Jul 2014 04:13

Re: Display NTFS permissions list with option to print & exp

Post by substorm »

@highend: thanks for that idea but I mainly need to save NTFS permissions of the current folder.
Isn't there a way that XYplorer can grab that info from Windows? A simple two column output (Member Name and Type of access) with a folder path as the Title would be sufficient. I have never used XY's scripts so if someone already has something similar and could share, I would be very thankful.

highend
Posts: 14568
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Display NTFS permissions list with option to print & exp

Post by highend »

You still need cacls / icacls (for modern OS'es) to get access lists for a ntfs file system.

A custom column script could look like this:

Code: Select all

 $ccPath = substr("<cc_path>", 0, -1);
 return trim(regexreplace(regexreplace(replace(runret("cmd /c icacls ""$ccPath"""), "$ccPath"), "\r?\n\s*", "||"), "(^|\|\|)\s*", " || "), " ||");
One of my scripts helped you out? Please donate via Paypal

substorm
Posts: 16
Joined: 15 Jul 2014 04:13

Re: Display NTFS permissions list with option to print & exp

Post by substorm »

Thanks highend!
How does this script integrate with XYplorer? Is it possible to select a folder and with a toolbar button run the script on that particular folder and automatically display the generated CSV?

highend
Posts: 14568
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Display NTFS permissions list with option to print & exp

Post by highend »

It's a script for a custom column^^

Selecting a folder and output it's ACLs

Code: Select all

 if (exists("<curitem>") == 2) { text runret("cmd /c cacls ""<curitem>"""); }
This could be used on a toolbar button.

CSV separated? Show a real world example of how things should be separated...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64868
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Display NTFS permissions list with option to print & exp

Post by admin »

substorm wrote:Thanks highend!
How does this script integrate with XYplorer? Is it possible to select a folder and with a toolbar button run the script on that particular folder and automatically display the generated CSV?
Something to read:
http://www.xyplorer.com/release_13.90.h ... bleColumns

substorm
Posts: 16
Joined: 15 Jul 2014 04:13

Re: Display NTFS permissions list with option to print & exp

Post by substorm »

I just tried the last script and it's working nicely except I would have to adjust some formatting to improve it visually.

Would it be possible to add this option in the report tab?:
Image

highend
Posts: 14568
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Display NTFS permissions list with option to print & exp

Post by highend »

And I've asked how exactly it should be formatted...
One of my scripts helped you out? Please donate via Paypal

substorm
Posts: 16
Joined: 15 Jul 2014 04:13

Re: Display NTFS permissions list with option to print & exp

Post by substorm »

highend wrote:And I've asked how exactly it should be formatted...
I was thinking similar to the way Windows displays it:
Image

I know it's asking too much, but is there a way to directly write to XLSX?

Post Reply