Magento Set Permissions
Firstly make sure ownership of magento directory is seteup
chown -R web-server-user-name .
e.g. chown -R apache . (for centos server)
or chown -R www-data . (for ubuntu server)
Then enter following commands:
find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \;
find var/ -type f -exec chmod 600 {} \;
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \;
find media/ -type d -exec chmod 700 {} \;
chmod 700 includes
chmod 600 includes/config.php
------------Fluediret-------------
chown -R fluedirectcouk0505yb:apache /var/www/vhosts/fluedirect.co.uk/httpdocs
1 - Create new user
sudo adduser magento_user
sudo passwd magento_user
2 - Find the web server group
CentOS: egrep -i '^user|^group' /etc/httpd/conf/httpd.conf
Ubuntu: ps aux | grep apache to find the apache user, then groups <apache user> to find the group (typically www-data)
3 - Put the Magento file system owner in the web server's group
CentOS: usermod -g apache <username>
usermod -g www-data <username>
to confirm user has been added to the group
groups <user name>
4 - switch to the new user
Ubuntu: su <username>
CenOS: su - <username>
5 - change permissions
Ubuntu: chown -R :www-data .
CentOS: chown -R :apache .
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento