Direct answer
A dedicated, non-root Linux user should own the writable server data. Permission errors may come from wrong ownership, a read-only mount or restrictive parent directories.
Recommended procedure
- Find the effective service user with
systemctl show -p User minecraft.serviceif using systemd; replace the example unit name. - From the server directory inspect
pwd,ls -ld .,ls -ld world plugins, andnamei -l /path/to/serverwhere available. - Look at the exact failing path in the server log and check whether it is mounted read-only.
What to change
systemctl show -p User minecraft.service
ls -ld /srv/minecraft
namei -l /srv/minecraft/world
# Example only, after verifying user, group and target:
sudo chown -R minecraft:minecraft /srv/minecraft- Stop the service and take a backup before repairing a large tree.
- If ownership really is wrong, have an administrator correct only the affected files, for example
sudo chown -R minecraft:minecraft /srv/minecraftafter verifying that path and account. - Grant the minimal required owner/group write access; restart as the dedicated account and retry the failing operation.
How to verify the result
Confirm normal plugin saves, world writes and restarts work without root privileges, and verify no unrelated directories changed.
Version and safety notes
Do not blindly run recursive chmod 777 or chown against /, the wrong world mount or a directory used by other services. SELinux/AppArmor and hosting panel ACLs can impose separate restrictions.
Official references
Related guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.