[Factorio Headless] no perms to load settings.json

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
JodyHighroller
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri May 05, 2017 8:18 am
Contact:

[Factorio Headless] no perms to load settings.json

Post by JodyHighroller »

[Edit: RESOLVED by first comment. Thanks!]

I'm trying to run a headless with limited Linux knowledge, I'm running it off a box we already use for other things (it's on a VPS so no risk in screwing up, I already got dozens of "if you don't understand Linux you shouldn't be using it" comments on a Linux subreddit, lol.)

I'm running this command:

Code: Select all

factorio@pvp:/root$ /opt/factorio/bin/x64/factorio --start-server A_15_13.zip --server-settings data/server-settings.json
And getting this error:

Code: Select all

 0.000 2017-06-05 03:32:21; Factorio 0.15.18 (build 30150, linux64, headless)
   0.028 Operating system: Linux (Ubuntu 16.04)
   0.028 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server" "A_15_13.zip" "--server-settings" "data/server-settings.json"
   0.028 Read data path: /opt/factorio/data
   0.028 Write data path: /opt/factorio
   0.028 Binaries path: /opt/factorio/bin
   0.032 System info: [CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz, 8 cores, RAM: 32188MB]
   0.033 Running in headless mode
   0.034 Loading mod core 0.0.0 (data.lua)
   0.037 Loading mod base 0.15.18 (data.lua)
   0.091 Loading mod base 0.15.18 (data-updates.lua)
   0.109 Checksum for core: 368996287
   0.109 Checksum of base: 3838408653
   0.167 Info PlayerData.cpp:56: Local player-data.json available, timestamp 1496647867
   0.168 Info PlayerData.cpp:63: Cloud player-data.json unavailable
   0.168 Custom inputs active: 0
   0.168 Factorio initialised
   0.169 Info ServerMultiplayerManager.cpp:140: Quitting multiplayer connection.
   0.169 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(Ready) to(Closed)
   0.176 Goodbye
   0.000  Error Util.cpp:62: Error when opening data/server-settings.json for reading: Permission denied
When I run it without the --server-settings argument it says the same thing about not having permissions to access the save file. I've already done chown -R several times and made sure that all of the files in /opt/factorio are owned by factorio:factorio.

I've gotten it to work before and had an issue that I've seen mentioned before where the server would crash every time it tried to autosave, I gave up on trying to fix that and I was too busy to try again at the time so this time I started from scratch and got stuck here. (Just thought I'd mention that in case it's relevant.)

Any help or suggestions would be much appreciated.
Last edited by JodyHighroller on Tue Jun 06, 2017 6:06 am, edited 2 times in total.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [Factorio Headless] no perms to load settings.json

Post by daniel34 »

Your working directory is the /root folder, it's possible that Factorio looks there for the settings/save. Try going into the /opt/factorio folder and then call it with bin/x64/factorio.
quick links: log file | graphical issues | wiki

JodyHighroller
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri May 05, 2017 8:18 am
Contact:

Re: [Factorio Headless] no perms to load settings.json

Post by JodyHighroller »

daniel34 wrote:Your working directory is the /root folder, it's possible that Factorio looks there for the settings/save. Try going into the /opt/factorio folder and then call it with bin/x64/factorio.
Yep... that was it. Thank you so much. I was so deep into trying to fix lag issues and stuff the last time I got it working that I didn't notice that simple mistake. I really appreciate it.

Speaking of which... Any advice for getting rid of lag? I started the server earlier and there was 0 lag like I was playing singleplayer, now there's like a 100-200ms delay when moving items around in chests.

Post Reply

Return to “Technical Help”