hexlo / terraria-tmodloader-server

A tmodloader 1.4.4 server, using docker
GNU General Public License v3.0
20 stars 13 forks source link

Permission denied when starting server. #9

Open foxhnd opened 2 months ago

foxhnd commented 2 months ago

Hello,

I've installed AlpineLinux in a VM and then pulled the code, added some mods, edited the install.txt and enabled.json and built the image.

I also tried on RockyLinux installed on a PC and got the same permission errors.

All went fine however, upon starting it it gives all sorts of permission denied like the error above:

zero:/home/terraria/terraria-tmodloader-server# docker-compose up [+] Running 1/0 ✔ Container tml Created 0.0s Attaching to tml tml | touch: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 9: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 12: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 20: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 21: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 22: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 23: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 28: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 29: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 30: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 31: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 32: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | /home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 33: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied tml | [exited] tml exited with code 0

`ln: /home/tml/.local/share/Terraria/tModLoader/server: Permission denied

Sdln: /home/tml/.local/share/Terraria/tModLoader/server/banlist.txt: No such file or directory

SdA tModLoader server is not installed yet, please run the install or install-tml command before starting a server

t[exited]

touch: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 9: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 12: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 20: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 21: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 22: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 23: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 28: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 29: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 30: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 31: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 32: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

/home/tml/.local/share/Terraria/tModLoader/Scripts/create-config.sh: line 33: /home/tml/.local/share/Terraria/tModLoader/serverconfig.txt: Permission denied

tcq]10;?\]11;?\ `

I am pulling my hair out as I am clueless of what needs to be done and some help will be greatly appreciated.

hexlo commented 2 months ago

Hey there,

Two things that comes to mind:

  1. Does the Docker user have sudo privileges?
  2. What are the file's permissions in the tModLoader/Scripts directory. Are they executable?

I'll try to replicate the issue later tonight.

foxhnd commented 2 months ago

Yup, Docker is running with root privileges. The files are executable.

GustavoSchip commented 1 week ago

I had the same problem, anybody figured this out?