overviewer / Minecraft-Overviewer

Render high-resolution maps of a Minecraft world with a Leaflet powered interface
https://overviewer.org/
GNU General Public License v3.0
3.36k stars 481 forks source link

overviewer.css being given 0600 octal permissions #1889

Open BenKennish opened 3 years ago

BenKennish commented 3 years ago

Every time i run a render, the existing overviewer.css file has its permissions changed from 0644 (rw-r--r--) to 0600 (rw-------) and this causes my web map to be rendered as a blank white page as Apache has no access to the file. This appears to happen at the "Preprocessing..." stage. Any ideas on why this is happening? My bash script now restores the permissions of this file after the render completes but as a render can take 20mins+, this isn't a good workaround. Any ideas?

CounterPillow commented 3 years ago

We just mirror the source's file permission and add the writable flag to it, this is done in https://github.com/overviewer/Minecraft-Overviewer/blob/47a0604b5a80797154a04d150ebd714010044298/overviewer_core/files.py#L65

My guess is that you made your web_assets directory non-world-readable.

BenKennish commented 3 years ago

Just noticed that overviewer_core/data/web_assets/overviewer.css in my overviewer install directory was 0600 for some reason (no idea why) and have changed it to 0664

CounterPillow commented 3 years ago

I think on Overviewer's side of things, we should also make sure to keep the permissions of whatever file we're replacing. I'll look into this when I get the time (quite busy atm)