SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image upload - folder rights 777 or 775?

    What rights do you usually set for uploaded images folder. Is normally 777 or 775?
    Dilster.com - Dating blog where you can find new dating tips, advices and ideas or your partner.

  2. #2
    SitePoint Guru rageh's Avatar
    Join Date
    Apr 2006
    Location
    London, Formerly Somalia
    Posts
    612
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I usually set 755 for image folders.
    ------------------

  3. #3
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I can confirm 755 is the best solution to use for image folder.

  4. #4
    Smart programmer silver trophy M.Zeb Khan's Avatar
    Join Date
    Jan 2004
    Location
    Luton, Beds
    Posts
    1,791
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think 775 will work, if he is uploading files to this folder via a web based script such as PHP. You have to use 777 so the script has written permissions to upload images/files to that folder.

  5. #5
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is why I put this question. I have a sharing hosting and I set 775. Until last week everything worked for half year. But last week stoped and it says failed to open stream: Permission denied in...
    So why it suddenly stopped working? I have never had any problems before on different hosting with 775 and image upload script. Will be a site less secure if I set to 777 now?
    Dilster.com - Dating blog where you can find new dating tips, advices and ideas or your partner.

  6. #6
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,413
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    If your hosts have implimented phpsusex you will need to use 755 from memory. They should have notified you of the change.

  7. #7
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With 775 I thought 755.

    Rubble the thing is I used 755 before and now doesn't work anymore, so it is a reverse case. Is this my fault because I haven't used 777 from starting or their mistake because they didn't notify me? Should be used 777 from starting or only once 755 stoped working? I need to know that because my client is saying that is my fault.

    thanks a lot!
    Dilster.com - Dating blog where you can find new dating tips, advices and ideas or your partner.

  8. #8
    SitePoint Evangelist mrwooster's Avatar
    Join Date
    Jan 2006
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The answer to this question really depends on your server setup, specifically how apache is run...

    If apache is run by the user who owns the folder, then 755 will suffice.

    If apache is run as a different user to the one who owns the folder, but is a member of the same user group, then 775 will suffice.

    If apache is run as a different user and is not in the same user group as the folder owner..... 777.

  9. #9
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    755 is the best for uploads. It really depends on your hosting company. Most hosting companies should have suPHP installed on their servers to prevent permission problems, if you're uploading via web you might get 999 (nobody).

    (i'm still half asleep if the above response doesn't make sense)
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  10. #10
    SitePoint Member
    Join Date
    May 2008
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have a related topic (but specific to wordpress) here: http://www.sitepoint.com/forums/showthread.php?t=716627


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
  •