Palworld

Palworld

View Stats:
Kadecgos Jan 21, 2024 @ 1:52am
Dedicated Servers: A Fix for "Failed save to backup." Error on Server Startup
I think I've figured out how to address this

There are a handful of mentions of this issue, but no one has posted a solution.

If you open up ../PalServer/Pal/Saved/Crashes/[Crash GUID]/CrashContext.runtime-xml, and find the <ErrorMessage> says something like:

"FatalError [File:D:\works\repos\PAL_SVN\Pal-UI_App\Source\Pal\PalSaveGameManager.cpp] [Line: 359[ Failed save to backup."

The problem here is that the server is trying to do stuff it doesn't have permission to do on the OS. The answer is simple: Elevate it.

Windows: Run as Administrator
Linux: sudo

This is what worked for me when trying to address this.
< >
Showing 1-8 of 8 comments
Flourish Jan 23, 2024 @ 12:27pm 
You're my hero. Although, for me, the issue was that the save file wasn't owned by the user that was running the server process, so "chown -R" was the solution I needed.

I swear, this has been the only helpful google search result throughout this entire process...
brovo Jan 23, 2024 @ 3:18pm 
Originally posted by Flourish (she/her):
You're my hero. Although, for me, the issue was that the save file wasn't owned by the user that was running the server process, so "chown -R" was the solution I needed.

I swear, this has been the only helpful google search result throughout this entire process...

Can You explain this to me? You cannot run the PalServer.sh as Sudo in linux as the app will auto terminate. What file did you chown exactly? I would really appreciate your help. Is it the directory itself?
brovo Jan 23, 2024 @ 3:39pm 
Figured it out, just so other know the answer is as follows.

You will be setting up the server with a root account to make all the folders, etc. You then will switch ownership of files to your secondary, non-root server account. With sudo, you will give permission to your secondary account with

sudo chmod -R ServerAccount NameOfYourPalServerDirectory

where ServerAccount and NameOfYourPalServerDirectory are variables to where you installed everything and to what account, for example mine was

sudo chmod -R steam palworld
tomogai Feb 1, 2024 @ 8:38pm 
Originally posted by brovo:
Figured it out, just so other know the answer is as follows.

You will be setting up the server with a root account to make all the folders, etc. You then will switch ownership of files to your secondary, non-root server account. With sudo, you will give permission to your secondary account with

sudo chmod -R ServerAccount NameOfYourPalServerDirectory

where ServerAccount and NameOfYourPalServerDirectory are variables to where you installed everything and to what account, for example mine was

sudo chmod -R steam palworld

i got this error during process

chmod: invalid mode: ‘steam’ Try 'chmod --help' for more information.
Sora Feb 1, 2024 @ 9:22pm 
If you run a program as root, and someone finds a remote code execution vulnerability they now have full control of the system. They can do whatever, run whatever, access any files on the system. Please DO NOT RUN AS ROOT. Executing anything as root without an explicit valid reason/requirement (e.g. system updates) is bad practice, and you should never run a game, or really any software as root. There are exceptions to running as root, or using sudo or su, but running a game is not one of them.

Originally posted by bdbcsvtlhc:
chmod: invalid mode: ‘steam’ Try 'chmod --help' for more information.

Thats because they provided chmod, not chown. chmod changes the attributes of a file (e.g. making it executable), and chown will change the owner/group.

To resolve any potential issues with ownership if you created a user but ran the server as a different user, or even root (please don't!) you will type
sudo chown --recursive account:group path/to/server
For example if you created a user "palworld" it will by default have a group called "palworld" as well, and if using the default home location exist in "/home/palworld" which is where you will change the command below.
sudo chown -R palworld:palworld /home/palworld

chown executed with sudo will then change the owner, and group to "palworld" for the directory and all sub content of "/home/palworld" to the new specified owner/group and since this will be done from root it will not care, and do it anyway. This will resolve ownership issues, executable permissions may need to be adjusted with the below as the user who plans to run it and not every file needs +x (executable) just the shell scripts, or binaries for a game.
chmod +x file
Mowerman Feb 1, 2024 @ 9:31pm 
I'm sorry but an app where people come to my machine and get access will never get admin access. You're asking someone to hack you. Especially since the game and server are still in alpha. Create a user and assign the game, and only the game, to it and set up a profile that gives it access to write in only the directory it needs to.
Sora Feb 1, 2024 @ 9:37pm 
Originally posted by Al Forno Olive Garden:
Linux: sudo
The reason this works is because root has now given the game server full system access. It has no need to worry about permissions to locations or file access, and can change anything on the operating system. This is BAD. You've potentially ruined, or atleast tainted the current system. It should be considered damaged, and if you run into issues later down the line would be easiest to re-install.

I mentioned in my the previous post. Running something as root is a BAD because if an exploit is ever found that exploit now allows the attacker FULL control of the system, and if you have private files, they're not private as root, they can now view -anything- or do -anything- or access -anything- on the system and if you're 24/7 connected or an actual server/VPS, you will likely be brought into part of a botnet.
supernet2 Feb 12, 2024 @ 9:37am 
Found a more viable solution, if your running a server and often swap where your server is run (locally, in my case i run like 3-5 servers, but i import the world and everything to different machines and pickup where im hosting it at).

Anyway, the solution is as follows

For windows based servers, your save files been blocked, For whatever reason AV, and the Windows 10/11/server inbuilt AV doesn't tell you this, you'd think even adding exceptions in to the malware protection folder portion but thats not it, its the actual files themselves. You need to go to their properties, and tick off the unblock section and then select okay/apply.

In my case i had to do so to level.sav , LevelMeta.sav LocalData.Sav and WorldOption.sav

For linux... its a user permission error, either your not using a dedicated user with read/write permissions, the world files are corrupt, or something happened (unexpected shutdown, and actual save corruption issue) where you'll need to rollback to a prior save.

Alot easier of what is to do, is to re-pull the files from the server you previously ran the files from, and just delete the entire save directory, and restore said files. In my case, i had to use one of the 3 solutions i've provided here to resolve my issue.

First being Unblock as the easiest solution first, before 2nd solution of repulling the server files from previous host, and last being to completely restore from backup due to corrupted save. (Never had a corrupted save, servers quite resilient in forced shutdown scenarios).

Edit: For the record i could 100% recreate these issues by doing the following (to corrupt/lockup permissions) on said save files mentioned.

Compress/move the files, during a active save process (while its being written too), Compress the save files while servers still running. Thats the only way i was able to recreate this issue.

But for the record, i was able to fix my own save files as well (as i have overwhelming backups in place for the VM, within the VM automated scripted backup, and a cloud sync system for the save files real time as they are modified). So.... yeah. lol.

Hope this helps everyone still encountering these issues even now.
Last edited by supernet2; Feb 12, 2024 @ 10:19am
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Jan 21, 2024 @ 1:52am
Posts: 8