1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-30 00:01:58 +00:00
ohmyzsh/plugins/perms/README.md
Carlo Sala 62929263fa
fix(perms)!: change function name from fixperms to resetperms and document caution (#10686)
BREAKING CHANGE: function `fixperms` has been renamed to the more accurate `resetperms`.
Please read the README carefully before using it as it may badly reset the permissions.

Fixes #10648
Closes #10686
2022-11-11 16:49:47 +01:00

1,011 B

Perms plugin

Plugin to handle some unix filesystem permissions quickly.

To use it, add perms to the plugins array in your zshrc file:

plugins=(... perms)

Usage

CAUTION: these functions are harmful if you don't know what they do.

  • set755: sets the permission to octal 755 for all given directories and their child directories (by default, starting from the current directory).

  • set644: sets the permission to octal 644 for all files of the given directory (by default, the current directory), recursively. It will only affect regular files (no symlinks).

  • resetperms is a wrapper around set755 and set644 applied to a specified directory or the current directory otherwise. It will set the permissions to 755 for directories, and 644 for files.

Reference

  • octal 644: read and write for the owner, read for the group and others users.
  • octal 755: read, write and execute permissions for the owner, and read and execute for the group and others users.