开发者

Querying for ACL on Linux

开发者 https://www.devze.com 2023-02-03 08:57 出处:网络
Is there any way to query ACLs on Linux programmatically? Given a file or directory, I have to check if an ACL exists for it and then find开发者_运维技巧 out the level of access granted to different u

Is there any way to query ACLs on Linux programmatically? Given a file or directory, I have to check if an ACL exists for it and then find开发者_运维技巧 out the level of access granted to different users. All I could find on the net were the getfacl and setfacl command line utilities which are of no use to me. Also, what are the best practices I need to follow when working with ACLs?


They are in the acl.h header. There are links out to each of the functions from here.

A few sample functions:

  • acl_create_entry - create a new ACL entry
  • acl_delete_entry - delete an ACL entry
  • acl_get_entry - get an ACL entry

The functions are in libacl.

0

精彩评论

暂无评论...
验证码 换一张
取 消