hal7

Registered
Feb 10, 2013
2
0
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
 

phicts

Active Member
Feb 8, 2013
36
0
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.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,013
537
493
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?
 

hal7

Registered
Feb 10, 2013
2
0
1
cPanel Access Level
Website Owner
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?
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..