narc0tiq / factorio-updater

Factorio update helper for headless servers
MIT License
244 stars 48 forks source link

Updating 0.16.4 to 0.16.5 resulted in wrong permissions on binary #34

Closed simonjgreen closed 6 years ago

simonjgreen commented 6 years ago

Command as run:

$ ./update_factorio.py -xDa ../factorio/bin/x64/factorio
Auto-detected starting version as 0.16.4 from binary.
/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:794: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedoc
s.org/en/latest/security.html
  InsecureRequestWarning)
Applying update with `../factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.16.4-0.16.5-update.zip`.
Update applied, deleting temporary file /tmp/core-linux_headless64-0.16.4-0.16.5-update.zip.

Resulting:

$ ./bin/x64/factorio --server-settings data/server.json --start-server Server --port=34197
-bash: ./bin/x64/factorio: Permission denied
$ ls -la ./bin/x64/factorio
-rw-rw-r-- 1 factorio factorio 97618248 Dec 18 13:54 ./bin/x64/factorio

Easily fixed afterward, but feels like a bug worth reporting.

Done on brand new Ubuntu 16.04 with requests installed from apt.

narc0tiq commented 6 years ago

I've seen this myself, but it's not a problem with the updater. Factorio does that all on its own, when ../factorio/bin/x64/factorio --apply-update /tmp/core-linux_headless64-0.16.4-0.16.5-update.zip gets done.

Most certainly related to https://forums.factorio.com/viewtopic.php?f=11&t=54786&p=322469&hilit=chmod... and supposed to be fixed, so go yell at HanziQ 😜

simonjgreen commented 6 years ago

Agreed, that's what's causing it. Just did it again up to 0.16.6.

However, given you are wrapping everything else, and they keep failing at this bit, why not include a chmod in your wrapper as well?

narc0tiq commented 6 years ago

I'm trying to avoid wrapping any more than I have to, actually -- and this one affects the Factorio devs more than us, since we've got a terminal open to run the updater anyway, whereas regular Linux players just do the in-game update (and end up wondering why it stops working).

Edit to add: looks like https://forums.factorio.com/viewtopic.php?f=7&t=55325 is tracking the issue now.