Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Image file permissions

    Quick question please.

    I am having a strange problem with the file permissions on my site. My server file permission are set to 755 for folders and 644 for files but still I am seeing files and folders at 777 when I view in file manager. I keep resetting these but all images being added, for example, sre showing at 777. What could be happening here please?

    Rob
    if elephants could fly, I'd be a little more optimistic....

  2. #2
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    604
    Plugin Contributions
    0

    Default Re: Image file permissions

    It sounds like a permission issue on the files folders etc..

    It may be that when zencart was installed it was on server level admin.

    Ask your webhost to check permissions are editable for your admin level.

    At worst and ask him to set permissions for you.

    https://www.zen-cart.com/tutorials/index.php?article=9
    That wasn't the plan!

  3. #3
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Image file permissions

    Thanks for your reply.

    I have used zencart for many years and have hosted several dozen sites for nearly ten years, having root level admin on my dedicated server. So setting file permissions is the least of my daily worries but this problem is one I have not seen before - image files are being uploaded 777, even though the server is using suphp and standard file settings are 644. Even the server tech guys have passsed this problem up the line. I just wondered if anybody else had experienced this issue and if it pointed to a script problem rather than a server problem.

    I appreciate your reply though

    Rob
    if elephants could fly, I'd be a little more optimistic....

  4. #4
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Image file permissions

    BUMP

    Anybody else go an idea:

    I got this response from hosting company:

    "Hi,

    I've gone through everything in your code which sets either umask or chmod but I can't get the files to upload with the correct permissions. There must be a setting in the DB which controls this. I've googled for this as well and I'm unable to find credible information.

    I can tell you that it is something in the code which is doing this."

    Please if anybody can tell me why omages are uploading to server and being forced to chmod 777 I would be grateful for the input. My hosting company are unhappy to contimue to host this site if I cannot resolve this matter.

    Rob
    if elephants could fly, I'd be a little more optimistic....

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Image file permissions

    It happens to me to.

    If i use zen to upload images their permission is set to 777, but it should be 644

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Image file permissions

    Zen Cart version?
    .

    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
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Image file permissions

    Dr Byte

    ZenCart 1.3.8a

    Rob
    if elephants could fly, I'd be a little more optimistic....

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Image file permissions

    1.38a through to 1.39f

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Image file permissions

    Up to v1.3.8a, Zen Cart was coded to set 777 on uploaded files. This was required for most server configurations else access to those files would be lost since the files were owned by other than the web account.
    With the advent of more and more hosting companies adopting suPHP and running as CGI, many hosts now dislike 777, and require a max of 755. In *those* particular hosting environments, even 644 will work fine, since the ownership problem doesn't exist. As of v1.3.9a uploaded files are set to 644.
    The downside to that is that anyone on older hosting that *does* allow the more conventional 777 usage but also runs apache as another user, those uploaded files won't be accessible via FTP. Such is the problem with uploading anything via the browser. It's quite complex when the filesystem permissions get involved.
    .

    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.

  10. #10
    Join Date
    Apr 2004
    Location
    Up t'north, UK
    Posts
    305
    Plugin Contributions
    0

    Default Re: Image file permissions

    Thanks Dr Byte

    Is there anything that can be done to 'force' image uploads at 644? I am particularly worried about the chances of hacking if any 777 files/folders are allowed.

    Cheers

    Rob
    if elephants could fly, I'd be a little more optimistic....

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Image folder file permissions?
    By Snaggle in forum General Questions
    Replies: 3
    Last Post: 15 May 2012, 07:06 PM
  2. File Permissions - Image Directory
    By countingsheep in forum General Questions
    Replies: 2
    Last Post: 13 Apr 2011, 02:48 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