waterworks2 Posted January 30, 2014 Share Posted January 30, 2014 (edited) I have a question regarding proper permissions during/after installation. I've uploaded the zip package for 1.5.6.2 and unzipped via SSH. I noticed that all folder permissions are all set to 700 and all file permissions are set to 644. Obviously to reach the installation page, I need to change some permissions. My question is what exactly should I change to 755 for installation? Do I change just the /install folder to 755? Or do I change everything inside that folder to 755 also?Do I need to change permissions on any folders or files in the prestashop directory AFTER installation? I've done some googling and the explanations I found weren't very specific other than to say 'change folders to 755', but they don't specify exactly which folders, or what permissions should be for files inside those folders. Some clarification would be awesome. Thanks. Edited January 31, 2014 by waterworks2 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 31, 2014 Share Posted January 31, 2014 usually directories have: 755 files: 644 check this: http://doc.prestashop.com/display/PS15/Installing+PrestaShop there is a part with information about recursive write permissions for directories 2 Link to comment Share on other sites More sharing options...
waterworks2 Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) Thanks for the good info vekia. So I am trying to get to my install page and still getting the 403 error. I have set permissions on the /install/ folder to 755 along with all the folders/files within it. However, I still cannot access the install page. What other folders do I need to set to 755 during install? Currently all other folders are set to 700 and all other files within those folders set to 644, which is how they appeared when unpacked from the original zip file for installation. I am using Bluehost. Edited January 31, 2014 by waterworks2 (see edit history) Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 (edited) You can try a chmod -R 755 /var/www to change the permissions recursively inside sub folders also. You said you have ssh into the server so i assume you have root access? Or some kind of direct command line access? Usually , to access the install page, these permissions are enough. Its later on during the installation that prestashop will warn you with not enough permissions. Maybe you havent copied over the files properly from the unzip? Edited January 31, 2014 by indus (see edit history) 1 Link to comment Share on other sites More sharing options...
waterworks2 Posted January 31, 2014 Author Share Posted January 31, 2014 Yes, I'm using SSH and I have root level access. I used filezilla ftp program to upload the zip file. Then I used SSH program PuTTy to unzip. Things went good there. Then I changed permission on the /install/ folder to 755 only and also all the files inside of that folder. However, I did not touch the rest of the prestashop files/folders. I tried your command and it worked great.So the way I understand it then, ALL folders in the prestashop zip file need to be set at 755 along with the files inside in order for installation to work. Thanks. Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 (edited) Actually, here is a better command, since the above sets file permissions also to 755 which isnt really needed. Once you enter your web root, for example /var/www ., Type this : find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; So it will set the appropriate permissions for files and folders. It will take a few seconds to finish. Now the good thing about most good shared hosts is, they auto set file and folder permissions to the above settings usually. But with your own VPS , you have to be a bit more careful. Edited January 31, 2014 by indus (see edit history) 3 Link to comment Share on other sites More sharing options...
waterworks2 Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) Ok thanks thanks for the feedback guys. Great stuff!However, I am still a bit confused on which folders should be set to what AFTER installation. So I've successfully installed Prestashop. It's working good. But now do I change the permissions on ALL folders back to the 755 and files to 644? I just want a secure shop that runs good. Of course this is just a test run of Presta so I can practice with it and get familiar with all of it's features. So far I'm really liking the admin area. Clean and organized which is nice. Edited January 31, 2014 by waterworks2 (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted January 31, 2014 Share Posted January 31, 2014 Here you will find a list for the suggested rights: http://www.prestashop.com/forums/topic/60420-is-setting-chmod-to-777-dangerous/?do=findComment&comment=1526656 2 Link to comment Share on other sites More sharing options...
waterworks2 Posted January 31, 2014 Author Share Posted January 31, 2014 Thanks for the link selectshop! Exactly what I was looking for. Thanks for all the help everyone. Thanks to everyone's help here, things are trucking along nicely with my PrestaShop adventure. Link to comment Share on other sites More sharing options...
selectshop.at Posted January 31, 2014 Share Posted January 31, 2014 If help was what you was expecting, so please dont' forget to set solved in front of title by editing your first topic with "more options" and also give a like to the topic/user helped you. 1 Link to comment Share on other sites More sharing options...
smallbizwiz Posted July 22, 2014 Share Posted July 22, 2014 Here you will find a list for the suggested rights: http://www.prestashop.com/forums/topic/60420-is-setting-chmod-to-777-dangerous/?do=findComment&comment=1526656 Do you know if there's an issue setting directory permissions to 765 instead of 755? I want to use vsftp and add the user FTPing to the www-data group vs. setting ownership to the user. Link to comment Share on other sites More sharing options...
smallbizwiz Posted July 22, 2014 Share Posted July 22, 2014 I have tested extensively using 775, and it works great. 775 allows the group owning the folder to read/write/execute but prohibits anyone else. You need to add the user to www-data via ssh: # usermod -a -G www-data yourftpuser. Verify the group membership, #id yourftpuser. Verify the ownership of the folder #ls -l. Try your FTP. Good luck! Link to comment Share on other sites More sharing options...
Phinky503 Posted January 14, 2016 Share Posted January 14, 2016 I really appreciate this thread! I have a situation where I needed to install an ancient copy of Prestashop. The default permissions that Prestashop set are wacky and all needed to be changed. Running a custom command in WINSCP worked. It's all about:find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;Thanks indus! 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