Skip to content

joaovitorbf/per

Repository files navigation

per

per is a CLI tool that simplifies managing Linux file permissions and ACLs. Instead of using chmod, setfacl, and getfacl, you can use plain English.

Features

  • Simple syntax: Uses words instead of octal numbers to manage permissions.
  • Automatic ACLs: per uses standard UNIX permissions when possible, and automatically falls back to ACLs when you need to grant access to specific users or groups.
  • Safe defaults: Blocks risky actions by default, like making executables globally writable or writing to setuid files. Use --unsafe to override.
  • Smart directories: Automatically grants directory execution (traversal) when read access is granted. Like chmod +X, recursive execution only applies to already executable files.
  • No dependencies: Built with the Go standard library only.

Usage

Grant permissions:

per grant <perms> [on] <target> [recursively] [to] [user|group] <actor>

Revoke permissions:

per revoke <perms> [from] <target> [recursively] [from] [user|group] <actor>

Show permissions:

per show <target>

Examples

Grant read access to user alice:

per grant read on myfile.txt to user alice

Grant read and write recursively to group dev:

per grant read,write on /var/www recursively to group dev

Revoke all permissions from user bob:

per revoke all from secret.key for user bob

View exact permissions and see where they come from (Standard or ACL):

per show /etc/config

About

Friendly Linux permission manager. Mirror of https://codeberg.org/jvbf/per

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages