Dedicated server crash with read-only binary directory

This subforum contains all the issues which we already resolved.
Post Reply
Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Dedicated server crash with read-only binary directory

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Dedicated server crash with read-only binary directory

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: Dedicated server crash with read-only binary directory

Post by Baughn »

That worked splendidly, thanks.

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

Post Reply

Return to “Resolved Problems and Bugs”