For anyone running into the same problem as the op, the filepath in the script
/var/vintagestory/data
is different from the one in the online guide
/home/vintagestory/data
Changing it in server.sh to the latter will remove the need for sudo as the server user should already have access to the directory
/home/vintagestory