OP said he’s been using a Docker image that it’s “official by Docker”, and not the AIO image official by Nextcloud. The issue here is a random contributor on GitHub’s docker organization. Afaik those images are not carefully tested, docker, as many floss organizations rely primarily on contributors, and plenty of these are amateurs or students trying to build a profile…
Comment on How I accidentally wiped my server by having a typo in my Nextcloud docker config
lemmyvore@feddit.nl 1 year ago
Welp that’s it, I’m never using Nextcloud.
anzo@programming.dev 1 year ago
lemmyvore@feddit.nl 1 year ago
On an unrelated note: yeah it’s confusing that the official Nextcloud AIO docker image is not on Docker Hub and what you get when you search for nextcloud is a “Docker official image” that’s actually community-maintained. But as I said in my other comment in this particular case the problem exists in both images.
lemmyvore@feddit.nl 1 year ago
The script that killed OP’s files (
entrypoint.sh
) also exists in the official Nextcloud AIO image, and the offending line is there as well:rsync -rlD --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
I believe the
–delete
option is the problem here, it will delete all files in the target dir that aren’t in the source dir.Ironically, the script even has a
directory_empty
function it could use to double-check the target dir, but it doesn’t use it for this particular dir. 😆So, bottom line, a Nextcloud install will wipe out the target dir if you’re not careful and I stand by my decision to not touch it with a ten-foot pole.
quackers@lemmy.blahaj.zone 1 year ago
yeah thats what im taking away from this too… you dont just rm -rf shit in any application without some good ass verification from the user