Skip to main content

Script to change permissions and owner recursivily from current directory

Project description

Recpermissions PyPI - Downloads Tests

Recpermissions is a Python script to change Linux permissions and ownership in one step. It can delete empty directories when necessary.

This script doesn't work on Windows.

Usage

recpermissions

Recursively changes the ownership and permissions for all files and directories within a given absolute path.

recpermissions --user <user> --group <group> --files <PERM> --directories <PERM> <absolute_path>

Arguments:

  • --user <user>: The new owner for the files and directories.
  • --group <group>: The new group for the files and directories.
  • --files <PERM>: The octal permissions to set for all files (e.g., 644).
  • --directories <PERM>: The octal permissions to set for all directories (e.g., 755).
  • <absolute_path>: The absolute path to the directory to process.

remove-empty-dirs

Recursively finds and deletes empty directories within a given path.

remove-empty-dirs [--pretend] <absolute_path>

Arguments:

  • --pretend: If used, the script will only list the empty directories that would be deleted, without actually deleting them.
  • <absolute_path>: The absolute path to the directory to scan for empty subdirectories.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recpermissions-2.0.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recpermissions-2.0.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file recpermissions-2.0.0.tar.gz.

File metadata

  • Download URL: recpermissions-2.0.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.19.3-gentoo

File hashes

Hashes for recpermissions-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a2b7767cab6273952d0d6b873fdb4c0a9d71242d5b6940952b6286f0ebdbfa94
MD5 3a753722547acf718a010dc6694023cc
BLAKE2b-256 6d3d7f6e39d42e2ad8e2c42832399827fd620e4b9f7dbeab8fea692cf9d6cf81

See more details on using hashes here.

File details

Details for the file recpermissions-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: recpermissions-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.19.3-gentoo

File hashes

Hashes for recpermissions-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aff090996c4b61e78b086025fe01bbea9ae094eb9896b557f05e3197634c7c8f
MD5 a6b19b4da76cdc6caec2932293f00e1c
BLAKE2b-256 8f5fb993d7863a42c7309514cda7dbc673648e15731dc6ca717226413643f533

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page