Drupal Image Upload - Access Denied

Status
Not open for further replies.

famiglietti.chris51

New Member
Messages
4
Reaction score
0
Points
1
Installed Drupal 7. Content using standard image field.
When I upload an image, it doesn't do anything. The image file exists on the server (I can see it via FTP). However, via Drupal and anywhere on my site, it doesn't show up. When I go to the image's URL, it states "Access Denied."
The file permissions look usable. I've even gone so far as to make them 777. Still nothing. .htaccess is Drupal's standard (with Rewrite Base / uncommented).
I'm at a loss. This EXACT same setup (Drupal install and modules) works on 3 other servers (home, Linode, 000webhost). Why isn't it working here on x10? What do I need to do to fix this?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Files can't have greater permissions than 644 (directories 755), or you will run into security problems; anything higher represents a real security risk on the server.
 

famiglietti.chris51

New Member
Messages
4
Reaction score
0
Points
1
Thank you for the timely reply. However, that doesn't help me in the least. How can my images uploaded via Drupal become visible on my website?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
I haven't got a clue about Drupal, I was merely pointing out that your investigation was both barking up the wrong tree and likely to result in continued problems after you discover the root cause if you don't set the permissions back. If you think that's not helpful, that's your lookout.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
When I upload an image, it doesn't do anything. The image file exists on the server (I can see it via FTP). However, via Drupal and anywhere on my site, it doesn't show up. When I go to the image's URL, it states "Access Denied."
"Access Denied" (403 error code) could be due to how permissions are set and/or...
mod_security settings will throw a 404 error if it sees a "leaky" response and a 403 error if it sees a "shady" request
you'll get either a 403, a 404 or an empty response instead, depending on the apparent severity

With mod_security in place, it's difficult to tell what's going on - You can try enabling error logging (temporarily) via the PHP settings in cPanel to give you a better clue, since just about anything that throws an error is going to return a 403 or a 404

[ Select PHP Version ] on 'cPanel x3' homepage (not x10hosting's Basic) - then [ Switch to PHP Settings ] - change the [ display_errors ] and [ log_errors ] values to "On"
be sure to click on [ Save ] after you click on [ Apply ]

The file permissions look usable. I've even gone so far as to make them 777
if a free-hosting server 'sees' a permission set higher than 644 for any file - or 755 for any folder - it will throw a error at you
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Please could I have a link to an image showing the Access Denied message?

Thank you,
 
Status
Not open for further replies.
Top