“Host violates local access rules” error when trying to upload a picture to PhotoPrism webdav server


I use NextCloud to access all of my local shares remotely on the web. This includes my SMB shares hosted by my TrueNAS server. Now, I would also like to mount PhotoPrism’s /original and /import folders to NextCloud using the local webdav address. However, it appears NextCloud only has read only access to these webdav folders. When I sign in to NextCloud online and try uploading a photo to the imports folder I get a “Host violates local access rules” error. While the iOS client gives me a “500-Internal Server Error.” The Pastebin link below details the full error message as it appears on the NextCloud Log.

Then, when I look at the PhotoPrism log I see the following error:

2023-06-08 16:27:05 ERRO webdav: 'stat /photoprism/import/IMG_8491.jpeg.ocTransferId786209232.part: no such file or directory' in DELETE /import/IMG_8491.jpeg.ocTransferId786209232.part

My initial assumption is that this is cause by how the picture is uploaded in chunks and pieced back together again. Although when I upload a picture to NextCloud and move it to the PhotoPrism import folder I get the same error:

2023-06-08 16:30:47 ERRO webdav: 'stat /photoprism/import/IMG_8491.jpeg: no such file or directory' in DELETE /import/IMG_8491.jpeg

So, I’m not exactly sure what the problem is. When I sign into the webdav server on my Mac using the same credentials I do not run into any of these problems.

My intention with this set up is that I don’t have to share my webdav on the open internet and instead interface with it through NextCloud. I also use Cloudflare Tunnel to reverse proxy my server apps and they don’t support webdav at the moment. I also plan on using PhotoPrism as my photo archive so I only plan on uploading select pictures/videos. Therefore, I also don’t what to use software that constantly syncs my whole photo library. Accessing my other SMB shares via NextCloud works great. I’m also able to connect to the WebDAV server on my Mac no problem but using the same credentials on NextCloud doesn’t appear to work. However, I am able to see the files that are already in the folders. I think it may also be important to note that PhotoPrism does not allow you to access the WebDAV share through a browser. Therefore a client WebDAV app is required. Are there any recommendations to finding a solution?

hi @ralphshep welcome to the forum :handshake:

your description is very confusing and hard to understand. Please focus on one issue at time e.g. WebDAV has nothing to do with SMB and the fact access via SMB works doesn’t provide any evidence regarding WebDAV. Please describe the problem in a way so somebody completely unfamiliar with you system can understand the setup.

Please use the search - lot of issues have been discussed already e.g. the error when accessing other system living on the same host is described here:

from what you posted I understand

  • Photoprism can not access WebDAV shares
  • but you still try to store file on WebDAV
  • access to WebDAV is possible (or not)
  • Nextcloud can not save the file to WebDAV share (how does is access this share)

Please clarify which system is doing what and what did you tried to analyze the issue.

Thank you for the response. Let me add some points of clarification. I have Photoprism running in a Docker container on my TrueNAS server. Confidently, Photoprism shares the original and import folders using a WebDAV share. This way the user a mount the import WebDAV on their computer and drop in the pictures they want to upload to Photoprism. I have successfully been able to connect to this share on my Mac and upload photos.

Now, I’m trying to use the external storage add-on in NextCloud so I can access all of my network shares remotely all in the same place. Thus far I have been able to add the WebDAV server address and the credentials. I get a green check mark that NextCloud has successfully authenticated the WebDAV server and I’m able to see the files the files in the share. However, when I try dropping in a file NextCloud gives me a “500-Internal Server Error”. The pastebin link in my initial post has the full error message. But, PhotoPrism is seeing the that a file is being dropped in the folder because it shows a “no such file or directory” error.

not many details to understand the issue

PUT /remote.php/webdav/Photoprism-Import/IMG_5236.png from by admin at 2023-06-17T04:09:16+00:00

sounds more or less like NC is trying to save the file to itself… maybe there is some issue with DNS, port forwards etc… you must provide more details and logs from all systems (NC, Photoprism, TrueNAS, Cloudflare) so we can understand the problem.

PhotoPrism doesn’t give me any other record on the log other than that one line. I did find three errors listed on NextCloud in regards to trying to upload a file to the webdav. I have pasted all three errors to the Pastebin link below:

I don’t have any logs from TrueNAS, since I am working between two Docker apps, and I don’t have any logs from Cloudflare, and this problem also occurs when I connect to NextCloud via it’s local IP instead of the proxied address through CloudFlare