是否有用于管理UNIX ACL的Java接口 [英] Is there a Java interface for managing UNIX ACL
问题描述
我需要管理文件系统中文件的UNIX ACL(访问控制列表),其中包括查询&
我的第一个想法是创建一个POS(NFS风格的文件系统),在Linux,SUN等不同类型的UNIX系统上修改ACE(访问控制项)。
文件系统服务顶部的包装程序或接口来处理这些ACL需求。
有人知道可以用于此目的的此类Java API吗?
有人知道任何可用于此目的的Java API吗?
是的。它是 java .nio.file.attribute.AclFileAttributeView
是Java 7中NIO增强功能的一部分。
有一个简单的
( java.security
ACL内容用于由/在Java安全性范围内。与文件系统级别的ACL支持正交。)
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?
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.)
这篇关于是否有用于管理UNIX ACL的Java接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!