- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Accessing files that have restrictive ACLs
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2003 11:31 AM
тАО07-08-2003 11:31 AM
Accessing files that have restrictive ACLs
I'm currently working on an application that requires programmatically to discover all files on a windows file system (NT4.0, W2K, .NET). My application runs under an administrative account on the server but is unable to access folders that are restricted to a specific user account (may be a local or domain user)
Does anyone know of a way around this problem programmatically - some ideas we had were to try and add administrator programmatically to access list if access is denied, spoofing the user that owns the folder, some special setting in the administrator account....
Appreciate any pointers
Cheers
John G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2003 04:39 AM
тАО07-09-2003 04:39 AM
Re: Accessing files that have restrictive ACLs
Basically, you I have REXX pass the directory-list command to the machine's underlying opsys and pipe the response onto the REXX queue. This is just a one line REXX statement. The next statement opens a file and reads the queue in a loop, writing it line-by-line into a file. Then I close the file, reopen it, and read it in a loop, and write to another file; when a directory entry (ie: folder) is found, I execute a copy of the previous loop. Iterate the nested loops, swapping files so you don't overwrite your work, until no more directory entries can be found. Written properly, the script 'explores' its way to the bottom of each directory 'tree' and returns to do the next, and the next, etc., until all directory-trees are exhausted.
REXX is available from many sources. IBM even includes it on its PC DOS 6 disks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2003 05:16 AM
тАО07-09-2003 05:16 AM
Re: Accessing files that have restrictive ACLs
There should be a programmatic way to do it, but Microsoft may not tell you so that hackers do not get the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2003 04:38 PM
тАО07-12-2003 04:38 PM
Re: Accessing files that have restrictive ACLs
Save it to a file on your machine, give it a .rex extension, change the oFilename to point at the file where you want the output, and change the third line to be the drive and option(s) you want. Run it by typing C:\REXX FQDN
To run it for a multi-drive machine, say one with C, E, and F drives active, just copy the .rex file under additional names, change each copy to point at a particular drive, and make a .bat file that says the C:\REXX FQDN of each .rex file on a separate line; the execute the .bat file from the command prompt. The outputs will appear concatenated in the output file, presuming you used the same oFilename in each .rex copy.
If what you had in mind was something with a more tree-like output, we can do that too. Just say so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2003 04:39 PM
тАО07-12-2003 04:39 PM
Re: Accessing files that have restrictive ACLs
/* REXX ____________________________________________ */
oFilename='f:\rexxtest\HPforum\listall.txt'
oFile = .stream~new(oFilename)
dir="dir f:\*.* /S | RXQUEUE" /*SET THE DOWN-SYSTEM COMMAND*/
dir /*EXECUTE DOWN-SYSTEM COMMAND */
DO WHILE QUEUED() > 0 /*LOOP UNTIL STACK EXHAUSTED*/
PULL iLine /*GET NEXT STACK ENTRY*/
PARSE VAR iLine w1 w2 w3 w4 . /*POPULATE VARIABLES */
oFile~lineout(iLine) /*WRITE ONE LINE OUT*/
END /* ends the DO statement */
EXIT