![]() |
[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. |
You need to check /usr/local/apache/logs/error_log for reason why.
|
Thank you.
Problem solved, it has to do with Script Restricted Permission Mask under Admin Console => Configuration => Server => Security. |
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 |
Quote:
|
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? |
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. |
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? |
Quote:
check the permission of the file in question and the folder holds the file. Quote:
|
-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. |