LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Bug Reports (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=9)
-   -   [solved] 403 forbidden (http://www.litespeedtech.com/support/forum/showthread.php?t=6189)

guy100 08-26-2012 01:43 AM

[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.

mistwang 08-26-2012 09:55 AM

You need to check /usr/local/apache/logs/error_log for reason why.

guy100 08-28-2012 06:59 AM

Thank you.
Problem solved, it has to do with Script Restricted Permission Mask under Admin Console => Configuration => Server => Security.

bobykus 09-11-2012 05:28 AM

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

webizen 09-11-2012 10:50 AM

Quote:

Originally Posted by bobykus (Post 34979)
...
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.

bobykus 09-12-2012 01:26 AM

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?

webizen 09-12-2012 12:22 PM

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.

bobykus 09-18-2012 01:26 AM

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?

webizen 09-18-2012 10:45 AM

Quote:

Originally Posted by bobykus (Post 35101)
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/

bobykus 09-18-2012 11:47 AM

-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?


All times are GMT -7. The time now is 07:47 AM.