Page 1 of 1

Dedicated server crash with read-only binary directory

Posted: Fri Jun 09, 2017 6:14 pm
by Baughn
If the factorio directory is read-only, then this happens:

Code: Select all

svein@madoka> ls -ld server
dr-xr-xr-x 4 svein users 5 Jan  1  1970 server

svein@madoka> ./start.sh
Using terracognito.zip
+ rm -f console.log
+ server/bin/x64/factorio --start-server terracognito.zip --mod-directory mods --server-settings server-settings.json --rcon-port=27015 --rcon-password=[ELIDED] --console-log=console.log
   0.000  Error Util.cpp:62: Couldn't create lock file /home/svein/factorio/server/.lock: Permission denied.
I'm not sure what it's attempting to lock, but can I suggest putting the lock file in ~/.factorio? If you are in fact locking the binaries, then I'd note that a read-only binary directory is as good as locked, and the test can be bypassed.

Re: Dedicated server crash with read-only binary directory

Posted: Sun Jun 11, 2017 6:25 am
by Rseding91
It's trying to create the .lock file in the write-directory which you haven't defined so it's defaulting to that folder. Create a config.ini file and give it to the binary (--config *path*) and define the write-data and read-data correctly for each instance you plan on launching and it should work as you want.

Code: Select all

[path]
read-data=__PATH__executable__\..\..\data
write-data=__PATH__executable__\..\..
Is the default config.ini provided with the .zip version of the game.

Re: Dedicated server crash with read-only binary directory

Posted: Sun Jun 11, 2017 7:20 pm
by Baughn
That worked splendidly, thanks.

(Though backslashes didn't. Had to use slashes. This is on NixOS, of course.)