Closed Josefant closed 3 years ago
Does the user you are installing on not have sudo rights? You're getting permissions errors to /etc/systemd/system/Test.service but a user with sudo rights should be able to write there (and one without sudo rights will not be able to).
It doesn't seem like curl can write the scripts either which shouldn't even be in a protected location. Is this install mounted in read-only or something like that? Can you write any files to the disk? Something is highly unusual here for sure but hopefully that points you toward the right direction here!
I do have sudo rights, but there is a problem when running "sudo curl ...", or actually: the "curl to file" itself...
This is a fresh Ubuntu 20.04.02 LTS running on a VM in an ESXi server. Seems to be a problem with the "curl to file" part:
root@minecraft:/etc/systemd/system# curl -H "Accept-Encoding: identity" -L -o test.test https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/minecraftbe.service
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0Warning: Failed to create the file test.test: Permission denied
100 361 100 361 0 0 200 0 0:00:01 0:00:01 --:--:-- 200
curl: (23) Failure writing output to destination
Hmm... Could this be the reason?...
root@minecraft:/tmp# which curl
/snap/bin/curl
Yup. The snap version of the curl was the reason for this problem. Removed and reinstalled curl with:
sudo snap remove curl
sudo apt install curl
Then download of file seems to work fine.
Hey Josefant,
Glad you were able to get it! That's interesting it's a snap version of curl on there. Thanks for posting the solution!
Maybe add a check in the installation script?
Pseudo:
If which curl
contains snap, then give message that this could be a potential problem (curl could have problems writing certain files) - suggest to replace with apt version - and wait for user to continue.
Or:
Research and circumvent it. I suspect that snap have some kind of sandboxing which disallows writing data to certain places.
E.g. if you install the curl snap version and download to /tmp/... the file ends up in /tmp/snap.
Installed fresh Ubuntu 20.04.02 LTS and trying to install Minecraft server. Using default location, and non-root user.
Any suggestions on how to resolve this?