Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,372
    Plugin Contributions
    4

    Default The ultimate fix for permissions

    When I was installing Zencart the permissions issue haunted me.
    Setting numeric chmod to 777 is a security hazard and frowned upon, however some Zen Cart manuals sold publicly state that it should be used or 755.
    Now, 755 means that group has read and execute permissions but cannot write, the ZC installer complained that certain files and folders were not writable.
    So, finally the solution dawned on me, I remembered that in my olden days (2007), I used group www-data.
    The following instructions are valid only for a LAMP (Linux, Apache, Mysql, PHP) server using Debian or a derivative like Ubuntu, I don't know about nginx or Windows.
    You must use a command line, I don't know Cpanel or similar stuff.
    Now, with that out of the way:
    Under group www-data will work the PHP, mysql and Linux scripts that need to write during installation, so you need to change ownership of the whole site to your_user:www-data by placing your terminal above the directory were you unzipped your ZC files, which is /var/www/html and issue command from root or another user with superuser privileges (sudo user):
    chown -R my_user:www-data my-site.com.
    So we have changed ownership, now change permissions:
    chmod -R 775 mysite.com.
    After you have executed these instructions the installer will proceed.
    Enjoy.
    Last edited by ckosloff; 7 May 2023 at 05:05 PM.

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,157
    Plugin Contributions
    11

    Default Re: The ultimate fix for permissions

    Respectfully, I'd like to point out that all this is taken care of by proper installation in better than 95% of installations as most have their site on other than a locally-controlled server. 755 for folders and 644 for files is considered the norm. Setting the two configure.php files to 444 AFTER they are completed is a good safety measure.

    Your directions MAY be required for your particular setup but, I would caution anyone to stick with the specs found at https://docs.zen-cart.com/.

    Bookmark this. Use it. If it's wrong or confusing fix it or report it in the forum.

  3. #3
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,372
    Plugin Contributions
    4

    Default Re: The ultimate fix for permissions

    Quote Originally Posted by dbltoe View Post
    Respectfully, I'd like to point out that all this is taken care of by proper installation in better than 95% of installations as most have their site on other than a locally-controlled server. 755 for folders and 644 for files is considered the norm. Setting the two configure.php files to 444 AFTER they are completed is a good safety measure.

    Your directions MAY be required for your particular setup but, I would caution anyone to stick with the specs found at https://docs.zen-cart.com/.

    Bookmark this. Use it. If it's wrong or confusing fix it or report it in the forum.

    I very much respect your dedication to zencart and free software.
    I also respect your seniority and the way you answer posts in forums.
    I made clear that these instructions are meant for people who duke it out in the terminal.
    I installed the same way on a public website in my signature (under construction).
    In the Linode cloud I selected a Debian server, the same OS that I use in my home office, there are no differences.
    I saw that Apache server uses group www-data (apache2 config file), used to be httpd.conf in my olden days long ago.
    I went though a long hiatus, and recovery, so my memory of the fixes I implemented waned so I approach everything related to tinkering with utmost caution.
    In fact, at every step I run the apache2 configtest to make sure that there are no mistakes, there weren't any, it's logical to set group to www-data to make apache happy.
    That's how I set up zencart in the public server too.
    If users are on shared or managed hosting they will pay more to get power, free software will give power for a fraction of the cost, it's up to you.
    Thank you for your contributions.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,157
    Plugin Contributions
    11

    Default Re: The ultimate fix for permissions

    I fear that I did what most might do (and caused me to respond as I did). I read all but line 5 of your post.

    I saw "The following.." and went straight to "You must...".

    And, with the title of "Ultimate fix of permissions" I was mentally fixated on making sure no one tried that on standard hosting.

    Apologies, with a request that future posts be more informative as to their direction/application. It will help those who find these threads in the future.

 

 

Similar Threads

  1. v151 Applied fix-CHANGE-352 for Attribute Controller fail but didn't fix
    By LindeeG in forum Upgrading to 1.5.x
    Replies: 9
    Last Post: 15 Dec 2013, 07:07 AM
  2. fix cache permissions
    By asdco in forum General Questions
    Replies: 1
    Last Post: 17 Mar 2012, 10:52 PM
  3. Replies: 1
    Last Post: 22 Feb 2007, 09:52 AM
  4. Fix for Easy Populate Froogle with Chemo's Ultimate URL's
    By mccord42 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 8 Feb 2007, 04:06 PM

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