Menu

Tree [0a1fb2] master /
 History

HTTPS access


File Date Author Commit
 README.md 2020-02-18 Martin Mielke Martin Mielke [0a1fb2] Leave hidden files and directories alone
 fixhomeperms.sh 2020-02-18 Martin Mielke Martin Mielke [0a1fb2] Leave hidden files and directories alone

Read Me

fixhomeperms.sh

quick and dirty script to fix permissions for all files and directories under $HOME.

This little tool makes use of find and xargs to boost the operations and it's faster than the "find -exec chmod" combo.

Yes, you can run the same commands manually everytime but this script features options to fix all permissions on your $HOME as they should be... This is specially usefull when copying files from other systems and permissions on directories and files get garbled, and you end up with things like:

drwxrwxrwx directory

-rwxrwxrwx file

everywhere... ## considerations

The following is assumed:

1. directories are to be set as rwxr-xr-x (octal: 755)

2. non-executable files (i.e. PDFs, txt, etc) are to be set as rw-r--r-- (octal: 644)

3. executable files (i.e. shell scripts, Perl, Python, Ruby and RUN files) are to be set as rwxr-xr-x (octal: 755)

4. hidden directories and files are left untouched (thanks Drazenko Djuricic for the heads-up!)

Feel free to modify the script to suit your needs

## usage

Run fixhomeperms.sh without arguments or with -h to see the instructions.

# disclaimer

This script is provided "AS IS" and the author is not to be held responsible for any damage caused by the use or misuse thereof.

MongoDB Logo MongoDB