Issues with starting a headless server on centos 7

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.
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Issues with starting a headless server on centos 7

Post by TheGleaner »

Hello, I did a fresh install of centos 7, then followed the the wiki.factorio.com guide to a headless server, and it went fine until the create/start part: I keep getting this error:
15.751 Error FileUtil.cpp:284: Can't remove /opt/factorio/temp/currently-playing: No such file or directory
15.751 Error Util.cpp:57: boost::filesystem::create_directory: Permission denied: "/opt/factorio/temp/currently-playing"
I am still relatively new to Linux, so does mean I did something wrong or is there a workaround I haven't found?
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Issues with starting a headless server on centos 7

Post by DaveMcW »

Did you run

Code: Select all

su factorio
before trying to start it? You need to run the program while logged in as the owner of the files.
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

DaveMcW wrote:Did you run

Code: Select all

su factorio
before trying to start it? You need to run the program while logged in as the owner of the files.
yes I did and when I made sure I got this no matter if I used a file I moved to it or created(where I got the first errors) using --create ./saves/newgame.zip
1.895 Error Util.cpp:57: boost::filesystem::status: Permission denied:
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

When trying to load any save, created on machine or transferred to.
[factorio@Machinename]$ /opt/factorio/bin/x64/factorio --start-server newgame.zip
0.002 2017-07-12 09:15:32; Factorio 0.14.23 (build 25374, linux64, headless)
0.003 Operating system: Linux
0.003 Program arguments: "/opt/factorio/bin/x64/factorio" "--start-server" "newgame.zip"
0.003 Read data path: /opt/factorio/data
0.003 Write data path: /opt/factorio
0.003 Binaries path: /opt/factorio/bin
0.060 Running in headless mode
0.070 Loading mod core 0.0.0 (data.lua)
0.093 Loading mod base 0.14.23 (data.lua)
0.418 Checksum for core: 1291735968
0.418 Checksum for mod base: 786624017
1.887 Info PlayerData.cpp:57: Local player-data.json unavailable
1.887 Info PlayerData.cpp:62: Cloud player-data.json unavailable
1.891 Custom inputs active: 0
1.893 Factorio initialised
1.895 Error Util.cpp:57: boost::filesystem::status: Permission denied: "newgame.zip"
When trying to create one on the machine
[factorio@Machinename]$ /opt/factorio/bin/x64/factorio --create ./saves/server3.zip
0.022 2017-07-12 09:24:37; Factorio 0.14.23 (build 25374, linux64, headless)
0.023 Operating system: Linux
0.023 Program arguments: "/opt/factorio/bin/x64/factorio" "--create" "./saves/server3.zip"
0.024 Read data path: /opt/factorio/data
0.024 Write data path: /opt/factorio
0.024 Binaries path: /opt/factorio/bin
0.100 Running in headless mode
0.123 Loading mod core 0.0.0 (data.lua)
0.169 Loading mod base 0.14.23 (data.lua)
0.581 Checksum for core: 1291735968
0.582 Checksum for mod base: 786624017
2.935 Info PlayerData.cpp:57: Local player-data.json unavailable
2.935 Info PlayerData.cpp:62: Cloud player-data.json unavailable
2.939 Custom inputs active: 0
2.942 Factorio initialised
2.943 Info Main.cpp:613: Creating new map /home/JAGrieger/./saves/server3.zip
19.587 Error FileUtil.cpp:284: Can't remove /opt/factorio/temp/currently-playing: No such file or directory
19.589 Error Util.cpp:57: boost::filesystem::create_directory: Permission denied: "/opt/factorio/temp/currently-playing"
It will create a .zip file, and I did check in the /opt/factorio/temp/ for currently-playing and it was not there.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Issues with starting a headless server on centos 7

Post by DaveMcW »

Run

Code: Select all

ls -al /opt/factorio
and post the results.
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

Code: Select all

total 12
drwxrwxrwx. 6 factorio factorio 135 Jul 12 11:54 .
drwxr-xr-x. 5 root     root      50 Jul 10 20:19 ..
drwxr-xr-x. 3 factorio factorio  17 Jul 10 20:19 bin
drwxrwxr-x. 2 factorio factorio  24 Jul 12 11:54 config
-rw-r--r--. 1 factorio factorio 998 Jul 13  2015 config-path.cfg
drwxrwxr-x. 4 factorio factorio 144 Apr 19 08:20 data
-rw-rw-r--. 1 factorio factorio 925 Jul 12 11:54 factorio-current.log
-rw-rw-r--. 1 factorio factorio 933 Jul 12 11:54 factorio-previous.log
drwxrwxr-x. 2 root     root       6 Jul 11 11:12 temp
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Issues with starting a headless server on centos 7

Post by DaveMcW »

Ok, this command should fix it. Run while logged in as root.

Code: Select all

chown -R factorio:factorio /opt/factorio
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

DaveMcW wrote:Ok, this command should fix it. Run while logged in as root.

Code: Select all

chown -R factorio:factorio /opt/factorio
still getting this on any save I try

Code: Select all

2.015 Error Util.cpp:57: boost::filesystem::status: Permission denied: "server1"
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Issues with starting a headless server on centos 7

Post by DaveMcW »

Factorio Wiki wrote: As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

DaveMcW wrote:
Factorio Wiki wrote: As long as it fails saying it cannot find/open the savename.zip you are set! Just upload a save from your own computer and put it in the /opt/factorio/saves directory
I have. I still get that error.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Issues with starting a headless server on centos 7

Post by DaveMcW »

Code: Select all

/opt/factorio/bin/x64/factorio --start-server /opt/factorio/saves/server1.zip
TheGleaner
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 11, 2017 10:31 pm
Contact:

Re: Issues with starting a headless server on centos 7

Post by TheGleaner »

DaveMcW wrote:

Code: Select all

/opt/factorio/bin/x64/factorio --start-server /opt/factorio/saves/server1.zip
One problem with that: there is no file/folder there, it created a folder under home... and after adjusting that it still spits out a permission denied error.
Post Reply

Return to “Technical Help”