The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

File Permission..

Discussion in 'General Discussion' started by hal7, Feb 10, 2013.

  1. hal7

    hal7 Registered

    Joined:
    Feb 10, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi everyone!

    I am using cpanel on my hosting and I have a problem.

    I have a simple upload system such as uploads/files/images

    When the user uploads a file and an image, that image gets 644 file permission as default and I can not view the uploaded image. When I try to view that image I get:
    ****
    Forbidden

    You don't have permission to access /uploads/12/18.jpg on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    ****

    However if I manually change the file permission to 755, I can view the image. And the problem comes here..

    I can not set 755 file permission as default so the uploaded images are not viewable.

    Where should I look? what can I do for this?

    Thank you very much in advance!

    Haldun
     
  2. phicts

    phicts Active Member

    Joined:
    Feb 8, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Log-in to your Cpanel, click File Manager. Browse to that directory/folder (uploads/files/images), right click it and choose Change File Permission. There you can change it. Be careful with the file permission. directory/folder should be 755 and files set to 644 unless you need to edit them from time to time.

    Please also contact your web hosting provider as they could have set such permissions with in the system configuration.
     
  3. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    That does not make sense, 644 permissions mean read access for everyone.
    Are you sure you are changing permissions of the file, not the folder?
     
  4. hal7

    hal7 Registered

    Joined:
    Feb 10, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    If I change the permission of the file and image(755) I can view the image.

    But if the user creates an add the file, under uploads folder, is created automatic.

    So changing the permission of every file is not the idea actually.

    It is to be able to give file permission 755 as default to all created files(or will created) under uploads folder.

    Because with 644 I can not view the images..

    Plus: I have asked my hosting and they could not figure it out..
     
  5. phicts

    phicts Active Member

    Joined:
    Feb 8, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    That's it - just change the permission of the folder to 755.
    Then change your host, transfer to me. j/k :-D
     
Loading...

Share This Page