Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Security: clarification Folders to 755 Files to 644

    Concerning "steps in securing your Zen Cart" part 7B in the docs or #9 in the wiki your "images" and other folders:

    Thus, once your site is built and your images have been created/loaded, you should drop the security down from read/write to read. ie: change from CHMOD 777 down to 644 for files and 755 for folders (in image folder)
    ("images" and other folders cont)...File/Folder permissions settings
    On Linux/Unix hosts, generally, permission-setting recommendations for basic security are:
    folders/directories: 755
    files: 644
    I have CHMOD all files to 644 and folders to 755 in the image folder as stated above.

    Does the later statement mean that EVERY folder and EVERY file in my ZC file set should be changed to 755 and 644?

    Right now all my folders and files are at 755 (except configs and images)

    This may seem like dumb question, but, I want to be sure before I change the permissions on all my files

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Security: clarification Folders to 755 Files to 644

    I have CHMOD all files to 644 and folders to 755 in the image folder as stated above.

    ---

    Right now all my folders and files are at 755 (except configs and images)
    --------------------------------------------------
    Somewhat conflicting statements.
    I take it you meant to repeat what you said the first time?

    As to your question on permissions, when Hosting on a Linux Server you must have directories set to 755 and files to 644. This is default setting and gives you some security. The exceptions are when specific permissions are stated within the install / setup procedure, as per any Error msgs. or when working on your site.

    The only time permissions should be changed "temporarily" is when working on your site and need to write to a directory or file. In that case, the directory must be 777 and the file 777. Once finished you put the permissions back the way they should be.

    Examples would be the Define Pages Editor. When working on those pages the 'classic' or 'custom' directory within the 'html_includes' dir. must set to 777 and the files within. Once finished, change permissions back.

    Another example is the 'images' dir. -- within your Document Root dir.
    When working in the Admin section, adding or editting products and needing to upload any image files, the 'images' dir. must be 777. Once finished change permissions back.
    Last edited by Website Rob; 29 Jan 2008 at 11:28 PM.

  3. #3
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: Security: clarification Folders to 755 Files to 644

    Thank you for the clarification. As all the files "out of the box" from the ZC download were 755 folders and 755 files I thought they were good to go as is.


    I will change all my files to 644 and folders to 755 except where noted they should be otherwise...like html includes folder at 555 (for my server) and configs at 444.

 

 

Similar Threads

  1. Files permissions - 644 versus 444
    By Crunch in forum General Questions
    Replies: 2
    Last Post: 25 Nov 2009, 09:33 PM
  2. OK to have all .php files with 755 permissions?
    By zcnb in forum Installing on a Linux/Unix Server
    Replies: 19
    Last Post: 5 Dec 2008, 05:41 PM
  3. Replies: 6
    Last Post: 27 Jan 2008, 11:33 PM

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