Page 1 of 1
Headless Linux Server
Posted: Sat Aug 13, 2022 10:02 am
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
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 10:33 am
by Loewchen
Is it the same for --help?
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 10:36 am
by 0neP1us
Yeah its the same.
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 11:41 am
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.
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 11:55 am
by 0neP1us
i am in that directory now and when i try to run it without root it says "Permision Denied"
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 12:03 pm
by Loewchen
What file system is the game installed on?
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 12:20 pm
by 0neP1us
ext4
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 12:26 pm
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
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 1:11 pm
by 0neP1us
I just did a reflash of the OS and tried again i Also checked the permisions
Still Does Not Work
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 1:29 pm
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
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 1:41 pm
by 0neP1us
sorry. I Mean I Reinstalled / Reset Linux And Switched to Pure Debian Instead Of Ubuntu
Here Is The Info You Requested!
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 1:51 pm
by Bilka
Your factorio executable is missing the execute permission.
To fix:
Code: Select all
chmod +x /opt/factorio/bin/x64/factorio
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 2:10 pm
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)"
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 2:27 pm
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.
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 2:41 pm
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.
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 2:47 pm
by 0neP1us
Ah Alright Im Very Sorry For Using Your Time I Should Propperly Have Asked That To Begin With!
Re: Headless Linux Server
Posted: Sat Aug 13, 2022 6:27 pm
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.