For SuiteCRM this is what I do for resetting permissions (you have to be root before executing)
Please adjust to your web server user (this one is for ubuntu )
find . -type d ! -path ./vendor -exec chmod 0755 {} ; && find . -type f ! -path ./vendor -exec chmod 0644 {} ;
chmod -R 775 cache custom modules themes data upload config_override.php config.php
chown -R www-data:www-data .
For redhat the apache webserver usually runs as apache
user so you should run:
find . -type d ! -path ./vendor -exec chmod 0755 {} ; && find . -type f ! -path ./vendor -exec chmod 0644 {} ;
chmod -R 775 cache custom modules themes data upload config_override.php config.php
chown -R apache:apache .
The first line makes sure all files are 644
and all folders are 755
just to make sure you don't have weird permissions.
Last but not least, ONLY in the case that someone has SuPHP you will need to run chown apache.nobody ./
for redhat and chown www-data.nobody ./
as apache usually runs as nobody and needs access to the root folder + SuPHP might complain of group write permissions on some folders so adjust :)
EDIT: Excluded the vendor folder which has its own file permissions needs (bin folder has executable files)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…