Caddy permission problems
While hosting my wife’s hugo blog, we encountered a weird thing: for some reason, her magnificient pegaclown pictures weren’t showing up.
After opening up the dev console, we can see it returns a 403 error, meaning a permission error. I thought at first that it was our Caddy server not working properly to serve files inside of the home directory, but actually it did work well: turns out moving the output folder did not help.
The actual solution for this was simply to beep, uuh I mean to change the permissions of the source image in the static hugo folder. As it turns out, those had reading permissions for the current user but not for any other user. To do this, you just have to run:
sudo chmod +r -R . #inside of the blog folder
Why they didn’t have read permissions on group/other? No idea. Maybe something to do with the git clone.
That’s it! have fun with your newly avalaible images.