Jump to content

release 1.5.6.2 403 forbidden /install


Recommended Posts

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

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 by idf@ (see edit history)
Link to comment
Share on other sites

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 by indus (see edit history)
Link to comment
Share on other sites

Wow, iam banned from viewing your website selectshop :D

 

 

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 by selectshop.at (see edit history)
Link to comment
Share on other sites

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

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 by idf@ (see edit history)
Link to comment
Share on other sites

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

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

  • 3 months later...

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 by julezstone (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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 by wippa (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 5 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...