{"id":16105078,"url":"https://github.com/intgr/posix-acl","last_synced_at":"2025-03-16T08:32:33.286Z","repository":{"id":39787731,"uuid":"238278440","full_name":"intgr/posix-acl","owner":"intgr","description":"Simple Rust library to interact with POSIX filesystem ACLs","archived":false,"fork":false,"pushed_at":"2024-09-05T21:56:39.000Z","size":115,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T05:56:00.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intgr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-04T18:40:26.000Z","updated_at":"2024-09-05T21:56:41.000Z","dependencies_parsed_at":"2024-01-07T18:28:45.646Z","dependency_job_id":"ba020ec1-447d-48e4-8bed-00211036b3d3","html_url":"https://github.com/intgr/posix-acl","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":"0.12121212121212122","last_synced_commit":"42a569d3b1cc1d63bb12fcdc5ed1adb6f21b30ff"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fposix-acl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fposix-acl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fposix-acl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fposix-acl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intgr","download_url":"https://codeload.github.com/intgr/posix-acl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806071,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T19:08:22.036Z","updated_at":"2025-03-16T08:32:32.934Z","avatar_url":"https://github.com/intgr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"posix-acl\n=========\n\n[![Crates.io version](https://img.shields.io/crates/v/posix-acl.svg)](https://crates.io/crates/posix-acl)\n[![Documentation](https://docs.rs/posix-acl/badge.svg)](https://docs.rs/posix-acl/)\n[![Tests status](https://github.com/intgr/posix-acl/workflows/Tests/badge.svg?branch=master)](https://github.com/intgr/posix-acl/actions?query=workflow:Tests)\n\n**posix-acl** is a Rust library to interact with POSIX file system Access Control Lists (ACL).\nIt wraps the operating system's C interface with a safe Rust API. The API is deliberately different\nfrom the POSIX C API to make it easier to use.\n\nOnly works on Linux. FreeBSD support seems viable as well, let me know if there is interest.\nmacOS does not support POSIX ACLs sufficiently for this library.\n\nResources:\n* [Library API documentation on Docs.rs](https://docs.rs/posix-acl/)\n* [Background information about ACL behavior](\nhttps://www.usenix.org/legacy/publications/library/proceedings/usenix03/tech/freenix03/full_papers/gruenbacher/gruenbacher_html/main.html)\n\n### Usage example\n```rust\nuse posix_acl::{PosixACL, Qualifier, ACL_READ, ACL_WRITE};\n\nfn main() {\n    // Read ACL from file (if there is no ACL yet, the OS will synthesize one)\n    let mut acl = PosixACL::read_acl(\"/tmp/posix-acl-testfile\").unwrap();\n\n    // Get permissions of owning user of the file\n    let perm = acl.get(Qualifier::UserObj).unwrap();\n    assert_eq!(perm, ACL_READ | ACL_WRITE);\n\n    // Get permissions for user UID 1234\n    let perm = acl.get(Qualifier::User(1234));\n    assert!(perm.is_none());\n\n    // Grant read access to group GID 1234 (adds new entry or overwrites an existing entry)\n    acl.set(Qualifier::Group(1234), ACL_READ);\n\n    // Remove ACL entry of group GID 1234\n    acl.remove(Qualifier::Group(1234));\n\n    // Write ACL back to the file\n    acl.write_acl(\"/tmp/posix-acl-testfile\").unwrap();\n}\n```\n\nRelease history\n---------------\n##### 1.2.0 (2023-12-11)\n\n- **Added:** `Qualifier` and `ACLEntry` now implement `Copy` and `Clone` ([#69](https://github.com/intgr/posix-acl/pull/69), [#70](https://github.com/intgr/posix-acl/pull/70))\u003cbr\u003e\n  Contributed by **eax-ebx**\n- **Added:** `Qualifier` and `ACLEntry` now implement `Eq` (in addition to `PartialEq`) ([#61](https://github.com/intgr/posix-acl/pull/61))\n- **Changed:** Many methods now have `#[must_use]` annotation ([#76](https://github.com/intgr/posix-acl/pull/76))\n- **Documentation:** Added separate errors/panics sections to many functions ([#71](https://github.com/intgr/posix-acl/pull/71))\n- **Documentation:** Added example CLI app that prints ACL ([#45](https://github.com/intgr/posix-acl/pull/45))\n- **Build:** Declare Minimum Supported Rust Version (MSRV) as 1.60 ([#72](https://github.com/intgr/posix-acl/pull/72), [#74](https://github.com/intgr/posix-acl/pull/74))\n- **Build:** Enabled and fixed all Clippy pedantic lints ([#75](https://github.com/intgr/posix-acl/pull/75), [#63](https://github.com/intgr/posix-acl/pull/63))\n\n##### 1.1.0 (2022-05-25)\n\n* Added `ACLError::as_io_error()` method to access the underlying `std::io::Error` instance (#57)\n* Minor: Documentation tweaks (#46)\n* Minor: Clippy warnings fixed (#47, #49)\n* Minor: CI/tests improvements (#44, #58)\n\n##### 1.0.0 (2020-03-30)\n\n* **API change:** Now using `ACLError` structured error type instead of `SimpleError` (#39)\n\n  Error messages from I/O calls no longer include the file name.\n\n* The `PosixACL::new()` constructor no longer adds a `Mask` entry (#37)\n\n  `Mask` is only needed for \"non-minimal\" ACLs and automatically is added on write if necessary.\n\n* Major reorganization of code (#35)\n* Documentation improvements\n\n##### 0.5.0 (2020-03-17)\n\n* **API change:** Now using `AsRef\u003cPath\u003e` in methods that accept paths (`read_acl` etc.) (#33)\n\n  This means `.as_ref()` is no longer needed or allowed when passing paths to these methods.\n\n* Added methods `into_raw`, `from_raw` for converting to/from raw `acl_t` pointer (#21).\n  Thanks to @aidanhs!\n* Documentation tweaks \u0026 code cleanups\n\n##### 0.4.0 (2020-03-10)\nThis release is fully API-compatible with 0.3.0.\n* Documentation expanded substantially (#27)\n* Added `read_default_acl()` and `write_default_acl()` to interact with default ACLs of directories\n  (#18, #30). Thanks to @aidanhs!\n* PosixACL struct now implements the `Debug` trait (#24)\n* Improved test coverage and CI workflow\n\n##### 0.3.0 (2020-02-20)\n* Update 'acl-sys' and 'libc' dependencies (#14)\n\n##### 0.2.0 (2020-02-08)\n* Add equality trait for PosixACL (#7)\n* Use GitHub Actions \u0026 Docker for CI (#6)\n* Add ACL remove() method\n* Make ACLEntry fields public as intended\n\n##### 0.1.0 (2020-02-06)\n* Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintgr%2Fposix-acl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintgr%2Fposix-acl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintgr%2Fposix-acl/lists"}