Failing to export to Piwigo. How to debug?

Felix Kloss felix.kloss at
Tue Apr 25 16:26:46 BST 2023


I recently set up a self-hosted Piwigo instance and would like to upload 
pictures directly from digiKam.  It worked for one or two pictures in 
the beginning but now always fails with this error:

 > Failed to upload media into remote Piwigo. Error transferring
 > - server replied: Forbidden

I checked the server logs and found the following:

When "Resize photos before uploading" is enabled:

ModSecurity: [file 
[line "389"] [id "340029"] [rev "37"] [msg " WAF Rules: 
Attack Blocked - command in REQUEST_URI or Argument"] [data "/nc "] 
[severity "CRITICAL"] Access denied with code 403 (phase 2). Pattern 
match "(?:;|/|\\\\| 
|\\\\b(?:sleep|benchmark)\\\\b \\\\(? ?[0-9]|power ..." at ARGS:data. 
[hostname ""] [uri "/ws.php"] [unique_id 

I don't know anything about ModSecurity but found this description of 
the error:

Interestingly, if I disable the resizing before upload, I get a 
different error (something about spam, which doesn't make sense to me):

2023-04-20 16:13:06	Error	[client] 
ModSecurity: [file 
[line "213"] [id "300051"] [rev "9"] [msg " WAF AntiSpam 
Rules: Possible Spam: General"] [data " 732951 found within ARGS:data: 
[severity "WARNING"] Access denied with code 403 (phase 2). Pattern 
match "(?:magazine[ -_.,\\"\\\\'\\\\|]?(?:finder|netfirms)|rolex[ 
[hostname ""] [uri "/ws.php"] [unique_id 

Any idea what is causing this and if there is a way for me to fix it? 
Any hint on how I may debug this, would be very welcome.  For example, 
is there a log somewhere, where I can see the exact request that digiKam 
sends to the server?

I already posted the question on 
( and a 
user there said that on it is working for them, so likely it 
has to do with the configuration of my server (which is just a very 
simple web hosting package, so probably I can't change that config...). 
Anyway, I also tested the export to Piwigo in darktable and there it is 
working, so I still have some hope that there is something I can do to 
make it work with digiKam as well.

In case it matters: I'm using the digiKam 8.0.0 AppImage on Kubuntu 22.04.


More information about the Digikam-users mailing list