Service accounts to access a shared folder via WebDAV

Good afternoon,

I have a custom virtual appliance based on TurnKey Linux that I run at several remote sites, and what I want to do is have it upload files to a Nextcloud folder on a schedule. I tested this by using my own account to mount via WebDAV and copy files, and that worked fine.

It doesn’t need its own home folder, and I don’t want it to have access to anything but one subfolder of a group folder.

I thought about making a guest account for each one and sharing that subfolder with it, and that would be fine, except that there’s no email address for the onboarding process.

Thoughts/alternatives?

If you have your own domain, you can easily create some dummy-addresses. Or just real users for this purpose.

You can probably use a shared link directly (the thing with the mail address is just to send out notifications). I am not sure, there were some curl examples how to access shared links via webdav, I don’t remember if the sharing key was also the user name and a default or empty password.

https://docs.nextcloud.com/server/latest/user_manual/en/files/access_webdav.html#accessing-public-shares-over-webdav

https://docs.nextcloud.com/server/latest/user_manual/en/files/access_webdav.html#accessing-files-using-curl

:smile:

That was my fallback plan, just make some aliases for my account to get them set up.

I didn’t even realize you could directly map a share with WebDAV. I think that’s going to fit the bill. I won’t need the service accounts at all.

Thanks

Hey, I just wanted to say the curl option worked beautifully for what I was trying to do.

After the remote appliance runs a backup job, I wrote a script to run curl with find -exec after it backs up data to send the new files to Nextcloud, using a password protected share, and the remote system has no access to Nextcloud except for just the one shared folder. That did exactly what I needed it to do. :grin:


find *.cfg -newer last-run-timestamp -exec curl -u $sharetoken:$sharepwd -T {} “https://my.domain.com/public.php/webdav/{}” \;