Is there a Java interface for managing UNIX ACL

痴心易碎 提交于 2019-12-25 05:06:38

问题


I have a need to manage UNIX ACL (Access Control List) on files in a file system, and it includes query & modification of ACE (Access Control Entry) on different types of UNIX systems like Linux, SUN etc. with POSIX, NFS style file systems.

My first thought was to create a wrapper or an interface on top of the file system services to handle these ACL needs.

Is anybody aware of any such Java API that can be used for the purpose?


回答1:


Is anybody aware of any such Java API that can be used for the purpose?

Yes there is one. It is java.nio.file.attribute.AclFileAttributeView which is part of the NIO enhancements added in Java 7.

There is a simple example in the javadoc for the above class.

(The java.security ACL stuff is for access control implemented by / within Java security. That is orthogonal to ACL support at the file-system level.)



来源:https://stackoverflow.com/questions/21360619/is-there-a-java-interface-for-managing-unix-acl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!