Changer ownership of files in Docker

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 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.

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.

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.

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

1 Like