imagepng() and File Permissions

Discussion in 'PHP' started by SGBoise, Oct 15, 2008.

  1. #1
    Hey guys,

    I am having problems with my script. My script allows you to upload videos, music, pictures, etc. When I upload the thumbnail from the media it uses imagepng() to resize the thumbnail to the size I want.

    The problem is that it makes the permissions 363 which won't allow anyone to be able to read the file. I can't even change the permissions using ftp. I have to use the cpanel file manager.

    I also tried setting the permissions to 755 using chmod() in php and it returns as true.

    Anyone have any ideas?
     
    SGBoise, Oct 15, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    try 0755 instead of 755
     
    EricBruggema, Oct 15, 2008 IP
  3. SGBoise

    SGBoise Peon

    Messages:
    647
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Eric, I tried that and it worked.
     
    SGBoise, Oct 15, 2008 IP