Bisa / factorio-init

Factorio init script
MIT License
414 stars 82 forks source link

No permissions to write to /opt/ when using install option #187

Closed montematico closed 2 years ago

montematico commented 3 years ago

when running ./factorio install errors and returns Aborting install, unable to write to '/opt/factorio'!. Running as sudo does not help.

buson94 commented 3 years ago

You have to create the directory first and since you also seem to have the user "factorio" created beforehand as well, i would recommend running sudo adduser factorio --home /opt/factorio in your case (at least if you're running Ubuntu as well). The next thing that seems problematic is that Ubuntu creates default files in the home directory, so either deactivate the "Prevent accidential overwrites" section in the install command of the factorio file or install the server in a subfolder of this home folder...

Things that i expected this script would handle as well but seems like it doesn't, unfortunately i don't have any scripting skill otherwise i would add these things myself and ask for a pull request 😅

Bisa commented 3 years ago

Appreciate the insight @buson94 :)

Please, if you want to I'd be happy if you could elaborate on the things you mentioned in a separate/multiple separate tickets. For example "When installing, the script should make sure to do X".

<3

Bisa commented 3 years ago

@montematico did @buson94 's suggestions help you get the server installed or did you solve it in any other way?

(who owns the /opt/factorio directory, to help me debug this further - please provide the output of ls -alsh /opt/factorio and whoami)