RECPERMISSIONS(1)

NAME
RecPermissions: Change files and directories owner and permissions recursively.

SYNOPSIS
RecPermissions usage: recpermissions [-h] [--version] [--user USER] [--group GROUP]
                      [--files PERM] [--directories PERM] [--remove_emptydirs]
                      [--only]
                      absolute_path

DESCRIPTION

This app has the following mandatory parameters:

    --user

        User used to change files owner. It does nothing if it's not set

    --group

        Group used to change files owner group. It does nothing if it's not set

    --files

        File permissions in octal to be used. It does nothing if it's not set

    --directories

        Directory permissions in octal to be used. It does nothing if it's not set

    --remove_emptydirs

        When used in script, removes all empty dirs recursively from path.

    --only

        Only changes permissions to the file or directory passed in absolute_path parameter.

    absolute_path

        To avoid errors and wrong changes, path must be an absolute one.

EXAMPLES

    Null Example

        recpermissions /home/user/

        This comand does nothing

    Partial Example

        recpermissions --user user --files 644 /home/user/

        This command only changes user permissions and files permissions to 644. Group and directory permissions are not changed:

    Full Example

        recpermissions --user root --group root --files 640 --directories 750 --remove_emptydirs /home/user/

        This command will change user and group to root user and group. Files will have rw-r----- permisions and directories rwxr-x--- permisions. If the script finds empty dirs it will remove them:

    Only Example

        recpermissions --user user /home/user/README.txt --only

        This command will change user ownership to the file /home/usr/README.txt only