Changer ownership of files in Docker


#1

I'm using Owncloud to facilitate clients uploading large files (databases that will be imported into Discourse). I'm elated that I can create a directory for them and send them a sharing link for the directory. (Being able to create a user for them that emailed them a link to allow them to set their own password was my first desire, but not giving them an account at all has advantages).

My problem is that the owncloud files are owned by www-data. I'd really like to have them owned by my user.

Linuxserver docker images (like https://github.com/linuxserver/docker-duplicati) let you pass a PGID and PUID and have the files owned by that user.

It'd be great if Owncloud's docker image would allow the same.


#2

Best way to do this would be to configure external storage which could be owned by any user of your choosing. Ownership in the ownCloud folder will always have to be the user running Apache ... (or your Web Browser) I think.


#3

But that won't work because

I've thus far succeeded in not learning enough about Docker to know how to fix this. Perhaps somehow you'd need to pass into the container the desired UID to have Apache run under.


#4

You can configure an SFTP external storage inside ownCloud and upload the files there. It should fit for what you want.