narc0tiq / factorio-updater

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

PermissionError: [Errno 13] Permission denied #22

Closed chanz closed 7 years ago

chanz commented 7 years ago

Hi,

I get the following error when using your updater script. I'm using Debian 8.8, can you help me?

I use the following command: python3 update_factorio.py -p core-linux_headless64 -xDa /home/factorio/factorio

Results in: Traceback (most recent call last): File "update_factorio.py", line 197, in <module> main() File "update_factorio.py", line 155, in main version_output = subprocess.check_output([args.apply_to, "--version"], universal_newlines=True) File "/usr/lib/python3.4/subprocess.py", line 607, in check_output with Popen(*popenargs, stdout=PIPE, **kwargs) as process: File "/usr/lib/python3.4/subprocess.py", line 859, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child raise child_exception_type(errno_num, err_msg) PermissionError: [Errno 13] Permission denied

Best regards, Chanz

chanz commented 7 years ago

A friend gave me the obvious hint, that "--apply-to" or "-a" should not be a folder, but rather the factorio binary itself.

Works now. :-)

narc0tiq commented 7 years ago

Thanks for the feedback. Is there anything I can change in the documentation to make it easier to figure out in the future? I could try searching for a bin/x64/factorio as a suffix of what was given to --apply-to, maybe?

chanz commented 7 years ago

Thanks for your reply. Is it possible to validate the factorio binary? So maybe an appropriate error message is shown, if the factorio binary is invalid or the permission is denied.

I think the documentation is fine. I didn't even think about reading the documentation in detail since I got that strange error message.

narc0tiq commented 7 years ago

It's probably easiest to include a really dumb check like "is the target a directory?", but validating beyond that gets into the realm of undue complications (and/or manual work, which I'd doubtless forget to do). I'll see what I can do.