`snapcraft clean` fails silently

I ran snapcraft clean but continued to get weird behavior from subsequent snapcraft commands. It turned out that an earlier run of snapcraft had messed up the file permissions of parts/ and made it so that my user couldn’t clean that directory. It would have been great if snapcraft didn’t mess up the file permissions in the first place, but barring that, snapcraft clean should have told me that it didn’t do its job so that I would know to sudo rm the necessary files myself.

Do note that build using Docker will make the files owned by root:root

Thanks, that must have been what I did. Usually I map the docker UID and GID to my UID and GID but I must have forgot to set that up.