Results 1 to 9 of 9
  1. #1
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default 403 Forbidden error at store/admin URL

    I have an installation problem. Several months ago I successfully installed zen-cart 1.5.0 on my Dreamhost domain. I am now trying to install on a second domain, one I use for test purposes.

    I followed the installation instructions here: http://www.zen-cart.com/wiki/index.php/Installation
    However, when I try to open my store/admin URL to complete the process, I get a 403 Forbidden page - don't have permission to access (((mystore)))/admin

    Last time, I did not write down my exact steps, so can't say precisely what I did differently. But this should be very simple. What are my likely problems? Note that I tried both with and without a renamed admin directory (renamed to admin(((some string)))) and with and without changing the two dist-configure.php files to configure.php.

    One item I wonder about. The instructions say to chmod 777 for, among others:
    "[ZENHOME]/images -- do this folder recursively (all subfolders, and all their subfolders, and all their...). "
    Should I do this only for directories, or for directories-and-files? And for the other directories I'm changing, should I likewise change their file permissions too?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 403 Forbidden error at setup attempt

    Did you happen to rename your /admin/ folder, as per the instructions? If you did, then it's unsurprising that you'd get an error when trying to access the /admin/ folder since it doesn't exist (granted, a 404 would be expected instead of a 403).

    Perhaps something in your hosting account is specifically denying access to a folder named /admin/.
    Zen Cart doesn't specifically trigger 403 responses for merely trying to access the admin folder. The 403 is being triggered by your server, and not by Zen Cart. If it happens to be a folder permissions issue, then it's no different than any other folder permissions issue you would have in any hosting account using any web page or script.

    The important thing here is to find out the actual admin foldername, and use that instead. And if it's still called /admin/ then rename it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at setup attempt

    I tried with the /admin both renamed and not renamed. Just to be clear, is the correct sequence:

    upload files
    change permissions
    rename the two dist-configure.php's to configure.php
    change admin name
    access the new admin?

    I notice that the typical permission in the old admin (named admin[stuff I added]) is
    -rw-r--r-- e.g for admin_account.php

    but is
    -rwxr-x---
    for the new installation. That's clearly wrong - should it have been written that way by the tar -xvf command?

    I'll try changing those.

    Still don't know: does the [ZENHOME]/images chmod apply only to directories, or to directories and files?

  4. #4
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at store/admin URL

    Aha, chmod 755 for all files under /admin did the trick; I now see the "Hello. Thank you for loading Zen Cart" page. But I still don't know why I got those odd permissions to begin with. That's everywhere in the installation, so I suspect I'll have the problem elsewhere too.

    Should all files be 755 except those called out in the installation document?

    And of course I must change the admin name.

  5. #5
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at store/admin URL

    I mean 744, not 755

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 403 Forbidden error at setup attempt

    Quote Originally Posted by dream_mike View Post
    should it have been written that way by the tar -xvf command?
    Zen Cart is distributed as a zip, not as a tarball.
    If you're using a tarball, then the permissions being assigned are based on whatever you had before making the tarball.

    The required permissions are the simple basic permissions that any file would use on a website.
    Your webserver's default configuration for files and folders is what you want to use. A properly configured server will have that all set up in the umask already. And the common use of an FTP program to upload files will follow whatever umask etc settings are configured into the ftp-server daemon on the webserver.

    The only exception to using standard permissions is the need for a couple files to be writable temporarily and a few folders to be made writable so that the browser can be used to upload images etc and save some file contents, and for allowing the system to save various temporary files.
    http://www.zen-cart.com/content.php?...-files-folders

    All of this is outlined in the Implementation Guide found in the /docs/ folder. It's also pointed out to you during the zc_install system inspection stage.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at setup attempt

    Ah. The ftp was taking a long time (numerous retries for some reason) so I tried the tar method. Me and my bright ideas. Will go back to ftp of the individual files.

    Looks like this will do it. Thanks for your help, will report back after a successful installation.

  8. #8
    Join Date
    Apr 2006
    Posts
    413
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at setup attempt

    tar method is the best imo but yes the umask won't set the permissions up for you. Putty to your store directory and change all your store files to 644 (or whatever) and dirs to 755 using find, exec, chmod, eg: find . -type f -exec chmod 644 {} \; and do the same for d (directories but use 755).
    Last edited by jetx; 12 Sep 2012 at 06:19 AM.

  9. #9
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: 403 Forbidden error at setup attempt

    I now have a functioning store and admin setup. I find that reading the (mystore)/docs/1.readme_installation.html document would have been, for me, the best checklist for installation.

    Thank you, DrByte and jetx for your helpful suggestions.

 

 

Similar Threads

  1. 403 forbidden error
    By maxy007 in forum General Questions
    Replies: 1
    Last Post: 31 Jan 2011, 12:43 PM
  2. Error 403 - Forbidden
    By Bastol in forum Installing on a Linux/Unix Server
    Replies: 9
    Last Post: 15 Nov 2010, 12:06 PM
  3. 403 forbidden error when trying to access admin
    By jsiperko in forum Basic Configuration
    Replies: 1
    Last Post: 13 Jun 2006, 02:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR