LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > [solved] 403 forbidden

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2012, 01:43 AM
guy100 guy100 is offline
New Member
 
Join Date: Aug 2012
Posts: 5
Default [solved] 403 forbidden

I have move a working site from one server to another.

If i run it with Apache all si fine.

But if i enable Litespeed i get

403 Forbidden
Access to this resource on the server is denied!

Any help gonna be much appreciate.

Last edited by NiteWave; 08-28-2012 at 07:58 AM..
Reply With Quote
  #2  
Old 08-26-2012, 09:55 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
You need to check /usr/local/apache/logs/error_log for reason why.
Reply With Quote
  #3  
Old 08-28-2012, 06:59 AM
guy100 guy100 is offline
New Member
 
Join Date: Aug 2012
Posts: 5
Thank you.
Problem solved, it has to do with Script Restricted Permission Mask under Admin Console => Configuration => Server => Security.
Reply With Quote
  #4  
Old 09-11-2012, 05:28 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
I have a file with permissions 0640


ls -la wp-content/uploads/2012/09/DSC_0547-150x150.jpg
-rw-r----- 1 dannebbuffy dannebbuffy 9998 Sep 11 13:24 wp-content/uploads/2012/09/DSC_0547-150x150.jpg

and the same set in Server > Security > Required Permission Mask 0640

But still getting


wget http://www.ultimat.nu/wp-content/upl...47-150x150.jpg
--2012-09-11 14:26:59-- http://www.ultimat.nu/wp-content/upl...47-150x150.jpg
Resolving www.ultimat.nu... 212.97.132.237
Connecting to www.ultimat.nu|212.97.132.237|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2012-09-11 14:26:59 ERROR 403: Forbidden.


Do you know why? The files with 0644 like

ls -la wp-content/uploads/2012/09/IMG_2408.jpg
-rw-r--r-- 1 dannebbuffy dannebbuffy 1801428 Sep 6 12:49 wp-content/uploads/2012/09/IMG_2408.jpg


are just fine

http://www.ultimat.nu/wp-content/upl...9/IMG_2408.jpg


Restricted Permission Mask is set to 000
Reply With Quote
  #5  
Old 09-11-2012, 10:50 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by bobykus View Post
...
Do you know why? The files with 0644 like

ls -la wp-content/uploads/2012/09/IMG_2408.jpg
-rw-r--r-- 1 dannebbuffy dannebbuffy 1801428 Sep 6 12:49 wp-content/uploads/2012/09/IMG_2408.jpg


are just fine

...
This sounds like your web server running user (nobody) is not in the same group of dannebbuffy and hence can _NOT_ read file with 0640 permission.
Reply With Quote
  #6  
Old 09-12-2012, 01:26 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
OK,
but this is a part of Wordpress, which supposed to be executed by lsphp5 and
PHP suEXEC is Yes. Does it mean web server should read access to all users data anyway?
Reply With Quote
  #7  
Old 09-12-2012, 12:22 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
for shared hosting, 0640 permission should be OK.

pls enable debug logging (loglevel -> low) via Admin Console and check error log (i.e., /usr/local/apache/logs/error_log) for more details of 403 error.
Reply With Quote
  #8  
Old 09-18-2012, 01:26 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
Here is a part


2012-09-18 10:24:09.844 [DEBUG] [212.97.128.202:58464-0#APVH_institutfrancais.dk:lsapi] write resumed!
2012-09-18 10:24:09.844 [DEBUG] [212.97.128.202:58464-0#APVH_institutfrancais.dk:lsapi] Written to client: 1211
2012-09-18 10:24:09.844 [DEBUG] [212.97.128.202:58464-0#APVH_institutfrancais.dk:lsapi] HttpIOLink::suspendWrite()...
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58501-4#APVH_institutfrancais.dk] processContextPath() return 0
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58501-4#APVH_institutfrancais.dk] readyCacheData() return 0
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58501-4#APVH_institutfrancais.dk] HttpConnection::flush()!
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58501-4#APVH_institutfrancais.dk] Written to client: 259
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58501-4#APVH_institutfrancais.dk] HttpConnection::nextRequest()!
2012-09-18 10:24:09.863 [DEBUG] [212.97.128.202:58500-3#APVH_institutfrancais.dk] processContextPath() return 0
2012-09-18 10:24:09.864 [INFO] Failed to open file [/hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/switchcraft_LL_701.jpg], error: Permission denied


Does it mean the content from WP like images etc are server
by litespeed not php?
Reply With Quote
  #9  
Old 09-18-2012, 10:45 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by bobykus View Post
Here is a part


...
2012-09-18 10:24:09.864 [INFO] Failed to open file [/hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/switchcraft_LL_701.jpg], error: Permission denied


Does it mean the content from WP like images etc are server
by litespeed not php?
the jpg is static file. according to wp rewrite rules, it will not go through php but be served by web server directly.

check the permission of the file in question and the folder holds the file.
Quote:
ls -l /hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/switchcraft_LL_701.jpg
ls -ld /hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/
Reply With Quote
  #10  
Old 09-18-2012, 11:47 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
-rw-r----- 1 ifdanemark ifdanemark 14000 Sep 18 10:13 /hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/switchcraft_LL_701.jpg

drwxr-x--x 2 ifdanemark ifdanemark 8192 Sep 18 10:13 /hsphere/local/home/ifdanemark/institutfrancais.dk/wp-content/uploads/2012/09/


this is how it is with WP uploaded images. They are 0640!Any way to fix it?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:41 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.