Headless Linux Server

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.
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Headless Linux Server

Post by 0neP1us »

Hello I Was Trying To Setup A Headless Server For The First Time.
I Followed The Wiki But When I Try To Run A Command To The Factorio File Like This

Code: Select all

./bin/x64/factorio --create ./saves/my-save.zip
It Outputs The Following.
Command Not Found
Attachments
Screenshot 2022-08-13 120013.png
Screenshot 2022-08-13 120013.png (7.83 KiB) Viewed 2432 times
Loewchen
Global Moderator
Global Moderator
Posts: 9754
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Headless Linux Server

Post by Loewchen »

Is it the same for --help?
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

Yeah its the same.
Attachments
Screenshot 2022-08-13 123428.png
Screenshot 2022-08-13 123428.png (6.43 KiB) Viewed 2419 times
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Headless Linux Server

Post by SoShootMe »

You need to change directory to where you extracted the Factorio download - if you are in that directory, something went wrong earlier.

You shouldn't need to run as root (using sudo). You should only use sudo when necessary.
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

i am in that directory now and when i try to run it without root it says "Permision Denied"
Attachments
Screenshot 2022-08-13 135016.png
Screenshot 2022-08-13 135016.png (6.96 KiB) Viewed 2397 times
Loewchen
Global Moderator
Global Moderator
Posts: 9754
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Headless Linux Server

Post by Loewchen »

What file system is the game installed on?
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

ext4
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Headless Linux Server

Post by Bilka »

Needing sudo sounds like the permissions for the install are all messed up. Make sure your user has read, write and execute permissions on the executable. E.g, this is how the tarball installs executable permissions look like for me:

Code: Select all

erik@mars:~/Games/factorio/bin/x64> ls -l
total 215412
-rwxr-xr-x 1 erik erik 220579479 May  6 10:25 factorio
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

I just did a reflash of the OS and tried again i Also checked the permisions
Still Does Not Work
Attachments
Screenshot 2022-08-13 150736.png
Screenshot 2022-08-13 150736.png (15.3 KiB) Viewed 2374 times
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Headless Linux Server

Post by SoShootMe »

0neP1us wrote: Sat Aug 13, 2022 1:11 pm I just did a reflash of the OS and tried again i Also checked the permisions
Still Does Not Work
What does "did a reflash of the OS" mean?

As the factorio user, can you share the results of:

Code: Select all

cd /opt/factorio
ls -l bin/x64
bin/x64/factorio --help
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

sorry. I Mean I Reinstalled / Reset Linux And Switched to Pure Debian Instead Of Ubuntu
Here Is The Info You Requested!
Attachments
Screenshot 2022-08-13 153948.png
Screenshot 2022-08-13 153948.png (7.58 KiB) Viewed 2359 times
Screenshot 2022-08-13 154010.png
Screenshot 2022-08-13 154010.png (6.41 KiB) Viewed 2359 times
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Headless Linux Server

Post by Bilka »

Your factorio executable is missing the execute permission.
To fix:

Code: Select all

chmod +x /opt/factorio/bin/x64/factorio
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Headless Linux Server

Post by SoShootMe »

0neP1us wrote: Sat Aug 13, 2022 1:41 pm sorry I Mean I Reinstalled /Reset Linux And Switched to Pure Debian Instead Of Ubuntu
Here Is The Info You Requested!
Well, ls shows the executable isn't executable, so "Permission denied" makes sense.

Either the permissions have been changed (eg with chmod) since you extracted the tarball, or they were not set as expected in the first place. I think it's worth understanding why because even if you fix the executable's permissions, you may have other problems.

If you haven't changed permissions since extracting the tarball, the most obvious reasons for them being incorrect are that you did something unusual to extract the tarball, or the extraction was done with an unusual umask (eg 0133).

Or... clutching at straws... maybe something strange with the mount options?

Code: Select all

mount | grep -F "$(findmnt -no source -T /opt/factorio)"
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

Now It Works In My Windows Subsystem For Linux (WSL) Environment I Can Do --help
But When I Move The Files Over To My Dedicated Server It Breaks Again With The Permision Thing Even After I Change The Executeable Permision
chmod +x /opt/factorio/bin/x64/factorio
I Also Tried The Mount Command
mount | grep -F "$(findmnt -no source -T /opt/factorio)"
And Got This.

(EDIT)
But I Got It Working On My WSL Instance So Its Propperly An Error By Me.
Attachments
Screenshot 2022-08-13 162201.png
Screenshot 2022-08-13 162201.png (8.01 KiB) Viewed 2327 times
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Headless Linux Server

Post by Bilka »

Is your server a raspberry pi, as the username suggests? In that case, it won't work because Factorio does not support ARM.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
0neP1us
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Aug 13, 2022 9:53 am
Contact:

Re: Headless Linux Server

Post by 0neP1us »

Ah Alright Im Very Sorry For Using Your Time I Should Propperly Have Asked That To Begin With!
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Headless Linux Server

Post by SoShootMe »

0neP1us wrote: Sat Aug 13, 2022 2:27 pm But When I Move The Files Over To My Dedicated Server It Breaks Again With The Permision Thing Even After I Change The Executeable Permision
While (as explained by Bilka) Factorio can't run on a Raspberry Pi, for the benefit of others (and perhaps also yourself in other contexts) I guess from the above that you are copying from Windows and that is the cause of permissions being broken. This can almost certainly be avoided by copying the tarball to the Linux environment and extracting it there, which may well be faster too.
Post Reply

Return to “Technical Help”