Error: ln: failed to create symbolic link '//minecraft/spigot.jar': Permission denied
vrogojin opened this issue · 11 comments
Can you provide more details about your problem?
Did you attach the minecraft folder of the container to a folder of your host where you so not have permissions to write like -v /home/nimmis/mc-srv:/minecraft
?
Yes! I got this problem when i execute the command:
jlorenzo@minecraft:/$ docker run -d --name spigot -p 25565:25565 -e SPIGOT_VER=1.11.2 -e EULA=true -v /minecraft:/minecraft nimmis/spigot
I got /minecraft in my server
Setting version to 1.11.2
ln: failed to create symbolic link '//minecraft/spigot.jar': Permission denied
*** Running /etc/my_runalways/eula...
*** Running /etc/rc.local...
*** Booting supervisor daemon...
*** Supervisor started as PID 21
2016-12-28 20:32:18,856 CRIT Set uid to user 0
*** Started processes via Supervisor......
crond RUNNING pid 25, uptime 0:00:04
spigot BACKOFF Exited too quickly (process log may have details)
syslog-ng RUNNING pid 24, uptime 0:00:04
check the permission of the /minecraft folder does the user who is starting the server have the permission to write in this folder?
I will implement
- a check to see if the /minecraft directory is writable by the minecraft user (in case of problems with external volumes)
- set minecraft user as owner of all files in the /minecraft directory (as root) in case of problem 1 (maybe a force flag to be safe).
- a parameter for changing the UID of the minecraft user when starting the container
I have been on vacation so no fixes have been done, see if I can push it tomorrow
I have just released a new version which auto detects which user owns the mounted volume and adjusts the UID for the minecraft users. This should solve most of the problems that's been reported. There is also a variable SPIGOT_UID to force the UID to any UID if the auto detect should fail.
Do a
docker pull nimmis/spigot
and run it again, please report back if it solved you problem so I can close this issue
If I run the following command:
docker run --name spigot -v /any_path_to/minecraft:/minecraft -d -p 25565:25565 -e EULA=true nimmis/spigot
the build fails at some point with tons of collision errors:
[ERROR] /minecraft/build/Bukkit/src/main/java/org/bukkit/material/Pumpkin.java:[1] The package org.bukkit.material collides with a type
is there a problem with the syntax in the run command, or some other volume issue?
Can it have been a temporary missync as I can't get the same problem?
Does it build if you don't have the -v /any_path_to/minecraft:/minecraft? If so your problem lies in the mounted filesystem
Hello and sorry for the late reply to this. docker run works fine, builds spigot and launches the server. However the command above doesn't... am I missing a prior command for attaching the /any_path_to/minecraft? what I expect is to be able to launch the server with an existing world, build spigot.jar and run as usual... would that be possible?
This is what I do. I change directory to the one containing the existing world and run the command:
docker run --name spigot_genesis -v $(pwd):/minecraft -d -p 25565:25565 -e EULA=true nimmis/spigot
It all seems to work as usual, however the very 1st error received is the following:
[ERROR] /minecraft/build/Bukkit/src/main/java/org/bukkit/material/Pumpkin.java:[1] The package org.bukkit.material collides with a type
and it basically repeats for all the remaining java classes.
Do you run it on a Linux och Mac, have seen the same behavior when running docker on a MacOS
Mac. It's been some time now, I'll have a look again on both Mac, Linux and will report back.
This was a problem on both Windows 10 and MacOS but not on Linux. The latest build of spigot (from today) fixes this problem. Be sure to do get the latest version with
docker pull nimmis/spigot