Since updating from 1.20.2 to 1.20.4, the server removes group read permissions from various files upon saving, e.g.:
$ stat -c%A level.dat
-rw-r-----
$ mscs send world save-all
$ stat -c%A level.dat
-rw-------
In my case this prevents affected files from being backed up by a dedicated backup user.
I don’t see this change documented in the release notes, so I’m not sure whether it’s intentional, if there’s any way to opt out of the new behavior, or if I need to change the backup scheme to accommodate it.
For searchability: POSIX file permissions, mode 600
, umask 077
Linked issues
Comments 4
As of v1.21.1 and OpenJDK 21.0.4, this issue also appears to affect *.dat files in the playerdata directory:
prompt> find . -not -readable -exec ls -l {} \;
-rw------- 1 minecraft minecraft 1618 Aug 18 12:40 ./world_the_end/level.dat_old
-rw------- 1 minecraft minecraft 1621 Aug 18 12:45 ./world_the_end/level.dat
-rw------- 1 minecraft minecraft 1578 Aug 18 12:40 ./world/level.dat_old
-rw------- 1 minecraft minecraft 21555 Aug 16 20:40 ./world/playerdata/00000000-0000-0000-0009-01ff911f72ad.dat
-rw------- 1 minecraft minecraft 21548 Aug 16 20:40 ./world/playerdata/00000000-0000-0000-0009-01ff911f72ad.dat_old
-rw------- 1 minecraft minecraft 1575 Aug 18 12:45 ./world/level.dat
-rw------- 1 minecraft minecraft 1527 Aug 18 12:40 ./world_nether/level.dat_old
-rw------- 1 minecraft minecraft 1528 Aug 18 12:45 ./world_nether/level.dat
I'm experiencing the same issue as reported above, namely an inability to backup files as an unprivileged user.
Same problem for me but it’s been happening since v1.20.3 in my case.
Tested with multiple versions of Java and on a clean Ubuntu install; same issue.
Can confirm.
Ubuntu Server 24.04.2 LTS (GNU/Linux 6.8.0-79-generic x86_64)
Java(TM) SE Runtime Environment (build 24.0.1+9-30)
Vanilla Java Minecraft 1.21.5
Also with: fabric-server-mc.1.21.5-loader.0.16.14-launcher.1.0.3
I have the minecraft server as a systemd service using a user with no login. A data server accesses the minecraft server system with a read-only permission account to pull and make backups. Similarly, the minecraft server has a read-only account with the data server to pull and restore backups.
I can confirm the issue and I am affected too. My dedicated backup script cannot grab level.dat (not running as privileged user, of course).