File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Features new in Java 7 and the fly likes IsInherited flag in AclFileAttributeView Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "IsInherited flag in AclFileAttributeView " Watch "IsInherited flag in AclFileAttributeView " New topic

IsInherited flag in AclFileAttributeView

Reinier Labee

Joined: Dec 19, 2011
Posts: 2
Hi all,

I'm using the AclFileAttributeView to loop through the ACL's of a set of Windows folders. Now I want to determine if an AclEntry is inherited from its parent or if it has been assigned directly to the folder. The Flags of a AclEntry object only show the inheritance behaviour of the AclEntry itself (DIRECTORY_INHERIT, FILE_INHERIT, INHERIT_ONLY and NO_PROPAGATE_INHERIT) not if the AclEntry has been inherited from its parent. In the Windows API (via script or VB app) you have the IsInherited flag to retrieve this information. Has anyone done this using Java?


Now the directory c:\test has Read permission for the user TestUser. The subdirectory Submap has WriteAttributes permission directly assigned to this user.

Result for: C:\Test

Result for: C:\Users\Reinier\Test\Submap

I want to see that the Read permission on the Submap is inherited and not directly assigned. One option is to loop through all the parents to see if a similar permission has been assigned to the user, but that can become quite complicated and has an impact on the performance.

Reinier Labee

Joined: Dec 19, 2011
Posts: 2
The flag I'm talking about is INHERITED_ACE.
Don't get me started about those stupid light bulbs.
subject: IsInherited flag in AclFileAttributeView
Similar Threads
Study Notes from a person who secured 100%.
JavaScript Permission Denied...sometimes
long post IBM.158
overriden method