Create Folder with webdav


We want to create a folder and upload files with a “Superuser”, using

curl -u upload:password -X MKCOL “https://url/remote.php/dav/files/USER1/testfolder” -k

I always get:

<?xml version="1.0" encoding="utf-8"?>

<d:error xmlns:d=“DAV:” xmlns:s=“”>
<s:message>Permission denied to create directory</s:message>

Is there a way to define a user with rights over all nextcloud/data folders?

Thanks a lot for your help.

Test the same procedure with with the file explorer. Perhaps you find an error.

Hey, there is something

And Please note, that URL in a newer NC was changed (as you post it): https://HOST/remote.php/dav/files/USER/

I think that “upload” and “USER1” should be the same, e.g.:

curl -u USER1:password -X MKCOL “https://url/remote.php/dav/files/USER1/testfolder” -k

You might find it simpler to just mount WebDAV.

Hi there,

Thanks a lot for your answers!! The idea is to have one user with rights to all other users folder and files? We want to create and upload folders/files with php into workspace of other nextcloud users?!

Thanks a lot :slight_smile:

1 Like

Have a lock on a shared Workspace with Group Folders.
Or your “one user” have to share one folder with each user, then he will be able to manage content there.