A quick way to reset your public_html data to 755 for directories and 644 for files, then you can use something like this:

cd /home/user/domains/domain.com/public_html
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

or you can use my script here:

https://gitlab.com/arafatx/sofibox-luks-earth/-/blob/master/usr/local/bin/maxiscript/utils/perm

it has other features like viewing file permission in OCTAL representation by simply executing perm [optional_path]:

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment