cancel
Showing results for 
Search instead for 
Did you mean: 

Access forbidden Error 403

Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Access forbidden Error 403

I used to have a forum and would now like to start a new one. I have uploaded SMF 2.0.1. to the CGI server and set my permissions to 710 as suggested, but keep getting an Access Forbidden message when clicking on http://ccgi.evenement.plus.com/. What am I doing wrong?
11 REPLIES 11
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Access forbidden Error 403

The most likely cause of that error is incorrect file or directory permissions - see Section 7 of the CGI Platform PHP Upgrade FAQ.
Folders should have permissions set to 710 (a setting you mentioned) but what about files? PHP files should be 700, other files 640. Have you uploaded the SMF archive to ccgi or did you extract files from it on your PC first, then upload all the files and directories? If you uploaded the archive extraction would have to be done by a suitable bash script. One for WordPress has been posted in this forum but I don't recall seeing one for SMF.
David
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

Hi
Thanks for your response. I extracted files on my PC first, then uploaded them. The main folder and all subfolders are on 710. Do I need to put everything on 700?
Any ideas?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Access forbidden Error 403

When you uploaded the files was this done using automatic file type recognition in your FTP program? Files containing text (including .htaccess files) have to be uploaded as ASCII, image files as binary. Incorrect line endings (or corrupted files) result and will cause problems if the transfer type is incorrect. Has your FTP program been set to display hidden files - those with names beginning with a full stop? Having these visible might be useful later.
The default file permissions will normally come out as 0640. Permissions for PHP, Perl and CGI scripts need to be changed to 0700. This can conveniently be done using the setperms.cgi script you'll find in this post.
I've yet to install SMF from scratch on the current ccgi, so not sure if any changes to that script are desirable for SMF.
David
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

Thanks, I've given what you suggest a shot (at least as far as I understand it), but I think this is going to be too technical for me. Pity because I had no problems whatsoever setting up an SMF forum on CCGI a couple of years ago... It seemed simpler back then! Smiley
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Access forbidden Error 403

I'd expect whatever you did two years ago to work now. Did you put the forum in your ccgi root directory ( / ) as your opening post inferred, or in its own /forum directory?
The last install I did was on the old ccgi. Since the last installation step deletes the installation scripts as a security measure they are not there for me to check file permissions. Sad
I've installed many updates since, including migrating to version 2.0 and 2.0.1, no problems whatsoever. Smiley
David
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

This is how it looks (see attachment). "New Folder" is the 2.0.1 version. The other two folders are my past forum. I have tried using the same permissions setting (i.e. 755) but this didn't work either.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Access forbidden Error 403

Is "New folder" literally that or is it a disguised name? If the displayed name is correct I suggest renaming it so the name is all lower case and without a space (I'll assume "newfolder"). Its permissions, and those of any subdirectories, also need changing to 710 so the directory can be entered by the server. Make sure at least the index.php and install.php files within the directory have permissions 700.
I think that screen shot shows the cause of the 403 error. Browsing to ccgi.username.plus.com/ will try to serve an index.xxx file from your ccgi root / (xxx represents one of a number of extensions, php, html, …, etc). There isn't such a file and listing the directory contents is forbidden, so you get the 403 error.
If you try browsing to ccgi.username.plus.com/newfolder/ the index.php file in that folder should be served. I'm not sure if that invokes the installation script first time or whether you need to browse to the install script at ccgi.username.plus.com/newfolder/install.php to start installation.
David
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

Tried and ... it works! Many thanks for this; I wouldn't have guessed it... All the best, BR.
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

Sorry but I get another error when trying to install SMF this time. Is there something obvious that I am doing wrong here (please see attachments)?
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Access forbidden Error 403

The problem here is that you are supplying information for ccgi whereas it wants information for MySQL.
Since you have an old forum set up you must have activated MySQL previously. When you did that you should have received an e-mail which supplied your MYSQL access settings. The Server name would be rumpus or humbug, Password a 16 character string, Database name probably your username followed by _pn. The Table prefix on your old forum is probably smf_ so if you want to retain the tables for that you would need to change it for the new installation, perhaps to smf2_. If you *don't* want to retain the old tables I think you would have to delete them first using phpMyAdmin.
David
Tsonga
Grafter
Posts: 434
Registered: ‎25-01-2008

Re: Access forbidden Error 403

Ah, ok, thanks again, that's very helpful! Smiley