Download files from different file owners via webdav



I want to download files via webdav. I’m using an URL like this: localhost:8080/remote.php/dav/files/admin/testfile.xml
with basic auth header admin:$password
Is it possible to download files from different users with this authentication as well? When i try to download a file from localhost:8080/remote.php/dav/files/test/testfile.xml
i get the following response

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="">
    <s:message>File not found: testfile.txt in 'test'</s:message>

Is it possible to download files from other users? Can I create something like a technical user that can download files from other users?
Or is there a completly different approach to download files?




AFAIK no such possibility exists, unless knowing and using other users credentials.


Or sharing with such user or group. Or using the impersonation app - but that one does currently not have an API.
By purpose ownCloud, by default, does not allow the admin to have access to user data.

So the easiest way is that the users share data with a function user and you use that one in the API.


Thank you for your responses!

Is it possible to write my own App that has a REST endpoint that provides the requested files? Can i access the files via php or do i encounter the same auth issues?


I might be wrong, but I think you’ll end up with the same issue. There is no such thing like a superuser, capable accessing other peoples files.


Thank you again!
Looks like i have to take a different approach.