PhilCorleone Posted September 27, 2015 Share Posted September 27, 2015 Hello guys, I have been trying to figure this out for three days and it is driving the hell out of me. When I set the www folder permissions to 777 recursive, all problems are gone and Presta is smooth. But when I set the permissions to 755 recursive on all folders and files I get lots of problems such as fatal error smarty is not able to write to ../.. permission denied. I know that the best configuration would be 755 for folders and 644 for files but that's an enormous task to set them individually. Is there a shell command to do it all automatically? In addition, please note that the only user I have on the machine is root. I've read that for Apache guys, they give the www-data user certain permissions to control the files the way it wants. Would there be an equivalent way to it in nginx? Appreciated in advance, Phil. Link to comment Share on other sites More sharing options...
PhilCorleone Posted September 27, 2015 Author Share Posted September 27, 2015 I'm starting to get a better understanding of the situation right now. The Prestashop i'm working on right now was installed on a local windows IIS and then was moved to a Linux server. nginx has the user www-data active but it doesn't have any permissions on the files since the files were hosted previously by IIS not Apache. I have found the commands that give folders 755 and files 644 recursively but the question now is how do I assign the www folder to the www-data user to take control? find * -type d -print0 | xargs -0 chmod 0755 # for directories find . -type f -print0 | xargs -0 chmod 0644 # for files Thanks. Link to comment Share on other sites More sharing options...
PhilCorleone Posted September 27, 2015 Author Share Posted September 27, 2015 It is solved. For all those who move from other servers to apache or nginx, you need to give www-data the freedom to write to presta folder or the www folder. chown www-data:www-data -R /var/www/ OR chown www-data:www-data -R /var/www/prestashop Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now