idf@ Posted January 30, 2014 Share Posted January 30, 2014 Hello, I have a 403 Forbidden error when I try to install prestashop 1.5.6.2 Forbidden You don't have permission to access /install/ on this server. I try with prestashop 1.5.6.1, it work with this release. Where is the error on 1.5.6.2 ? Regard Link to comment Share on other sites More sharing options...
selectshop.at Posted January 30, 2014 Share Posted January 30, 2014 Seems that the rights for folder /install/ are wrong set. Pleasse change it complete folder and all contents in it to CHMOD 0777. Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) Hello, 1)Right modification root@myhost:~# chmod 0777 install -R Result : BLANK PAGE 2) Restart of apache root@myhost:/var/log/apache2# service apache2 restart Restarting web server: apache2 ... waiting . 3) open log file error of apache root@myhost:/var/log/apache2# less error.log [Fri Jan 31 14:54:19 2014] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!? PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0 [Fri Jan 31 14:54:19 2014] [warn] RSA server certificate CommonName (CN) `localhost.localdomain' does NOT match server name!? [Fri Jan 31 14:54:19 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u7 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations [Fri Jan 31 14:54:24 2014] [error] [client xxx.xxx.xxx.xxx] PHP Warning: require_once(/var/www/mysite/config/defines.inc.php): failed to open stream: Permission denied in /var/www/mysite/install/init.php on line 52 [Fri Jan 31 14:54:24 2014] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: require_once(): Failed opening required '/var/www/mysite/config/defines.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/mysite/install/init.php on line 52 Any a Idea ? Edited January 31, 2014 by idf@ (see edit history) Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 I found a solution, I unzip again prestashop to my directory. I do a chown -R www-data:www-data /var/www/mysite/ now all is ok. Is it dangerous for the security of my website ? Link to comment Share on other sites More sharing options...
selectshop.at Posted January 31, 2014 Share Posted January 31, 2014 (edited) Please see here the same question for correct folder rights. http://www.prestashop.com/forums/topic/305352-proper-folderfile-permissions/ Edited January 31, 2014 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 Wow, iam banned from viewing your website selectshop Link to comment Share on other sites More sharing options...
selectshop.at Posted January 31, 2014 Share Posted January 31, 2014 Warnings and notice are only messages of wrong configured modules you are running on your server. The other ones were related to missing files on your FTP. By again loading Prestashop to your FTP you completed the missing files Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 (edited) I found a solution, I unzip again prestashop to my directory. I do a chown -R www-data:www-data /var/www/mysite/ now all is ok. Is it dangerous for the security of my website ? This is good for running prestashop with all permissions, only issue is, in case there is a problem with some prestashop script, it could run as www-data and make changes to the files. Apart from the chown, you can try giving write permissions in folders only where it is needed, for example cache, config, upload and download etc.and translations folders . It is a good idea to leave files at 644 permissions and directories at 755 Edited January 31, 2014 by indus (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted January 31, 2014 Share Posted January 31, 2014 (edited) Wow, iam banned from viewing your website selectshop Yes site has restricted access only for countries I'm operating. Mainly Europe, USA, Canada and Brazil. I'm using Geolocation tool. If you have a special question you can use PM here in forum. I think in India there are better developers and IT-gurus as I'm, so don't need to offer my services there. Edited January 31, 2014 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 (edited) Its ok, iam just kidding. I rarely use pm myself. Except maybe send one or two to vekia Edited January 31, 2014 by indus (see edit history) Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) Please see here the same question for correct folder rights. http://www.prestashop.com/forums/topic/305352-proper-folderfile-permissions/ Thank you Edited January 31, 2014 by idf@ (see edit history) Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 Warnings and notice are only messages of wrong configured modules you are running on your server. The other ones were related to missing files on your FTP. By again loading Prestashop to your FTP you completed the missing files No file were missing . Only a right permission Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) This is good for running prestashop with all permissions, only issue is, in case there is a problem with some prestashop script, it could run as www-data and make changes to the files. Apart from the chown, you can try giving write permissions in folders only where it is needed, for example cache, config, upload and download etc.and translations folders . It is a good idea to leave files at 644 permissions and directories at 755 After installation do I have to modify again the right to be more secure ? If yes, what are the folder to re-secure and what is the good permission 0755 ? Edited January 31, 2014 by idf@ (see edit history) Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 who can give a command line with all chmod to apply by folder ? Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 Go to your web root ., /var/www or wherever it is and run this : find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; 1 Link to comment Share on other sites More sharing options...
indus Posted January 31, 2014 Share Posted January 31, 2014 Check this for more reading : http://www.prestashop.com/forums/topic/200692-777-755-and-644-problem-with-chmod-permissions-im-begging-for-help-please/ Iam still fine tuning my permissions for my VPS, so these are my suggestions at the moment. chown -R www-data:www-data /var/www/mysite/ works the easiest for prestashop, otherwise you will keep running into problems with permissions for some folder or another. If you are the only user on your server, this is safe enough. Otherwise more fine grained user access will be needed. Link to comment Share on other sites More sharing options...
idf@ Posted January 31, 2014 Author Share Posted January 31, 2014 Check this for more reading : http://www.prestashop.com/forums/topic/200692-777-755-and-644-problem-with-chmod-permissions-im-begging-for-help-please/ Iam still fine tuning my permissions for my VPS, so these are my suggestions at the moment. chown -R www-data:www-data /var/www/mysite/ works the easiest for prestashop, otherwise you will keep running into problems with permissions for some folder or another. If you are the only user on your server, this is safe enough. Otherwise more fine grained user access will be needed. Yes I'm the only user to use the server. Thank you ! Link to comment Share on other sites More sharing options...
julezstone Posted May 29, 2014 Share Posted May 29, 2014 (edited) The best way to install prestashop for inexperienced users is to upload the folders onto your server using FTP. That way all of the permissions end up correct. "Talking from experience, as I uploaded the zip permissions were wrong(0700). Also unzipped the zip and created with the file extension .rar and had the same problem. Uploaded using FTP and all permissions correct 0755 = Smooth Install." Edited May 29, 2014 by julezstone (see edit history) 1 Link to comment Share on other sites More sharing options...
wippa Posted July 10, 2014 Share Posted July 10, 2014 (edited) Go to your web root ., /var/www or wherever it is and run this : find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; Perfect solution! I dont know if can pass shell commands trought cron. I know i can run php process but never tried others. As a solution for people who only have php, i'd found a solution on that link http://snipplr.com/view.php?codeview&id=5350 Just copy code and and this code to the top of the file to autostart the function. $path = dirname(__FILE__); recursiveChmod ($path, $filePerm=0644, $dirPerm=0755); wich equals to this shell code. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; Why? I try that code on my server and the result was not the files i expect so i cannot interact with my www folder files: <?php echo exec('ls'); // Output is webservice. ;echo exec('ls ../'); // Output is www folder. ; echo exec('cat ../../www/index.php'); // Output is nothing. This php function from the link works perfectly. Edited July 11, 2014 by wippa (see edit history) 1 Link to comment Share on other sites More sharing options...
johnrobertson Posted October 15, 2019 Share Posted October 15, 2019 (edited) This looks useful. Is anyone here good at explaining it in foolproof words? It looks as though I should copy text to a file, amend it, and do something, but a set of instructions would be great. Edited October 15, 2019 by johnrobertson (see edit history) 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