I'm trying to set up a 1.18.2 fabric modded minecraft server but I keep getting this error when I try to run the .jar file for it from the terminal. I am running ubuntu version 22.04 and openjdk version 17.0.5 if that helps. I did previously set up a 1.19.3 server which worked perfectly fine, I'm only getting this issue now that I've redownloaded fabric server for the different version.
When I run $ java -jar fabric-server-mc.1.18.2-loader.0.14.12-launcher.0.11.1.jar I get this error:
Exception in thread "main" java.lang.RuntimeException: Failed to setup fabric server
at net.fabricmc.installer.ServerLauncher.main([ServerLauncher.java:56](https://ServerLauncher.java:56))
Caused by: java.nio.file.AccessDeniedException: /home/mcserver/actualserver/.fabric
at java.base/sun.nio.fs.UnixException.translateToIOException([UnixException.java:90](https://UnixException.java:90))
at java.base/sun.nio.fs.UnixException.rethrowAsIOException([UnixException.java:106 (https://UnixException.java:106))
at java.base/sun.nio.fs.UnixException.rethrowAsIOException([UnixException.java:111 (https://UnixException.java:111))
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory([UnixFileSystemProvider.java:397 (https://UnixFileSystemProvider.java:397))
at java.base/java.nio.file.Files.createDirectory([Files.java:700 (https://Files.java:700))
at java.base/java.nio.file.Files.createAndCheckIsDirectory([Files.java:807 (https://Files.java:807))
at java.base/java.nio.file.Files.createDirectories([Files.java:793 (htps://Files.java:793))
at net.fabricmc.installer.ServerLauncher.initialise([ServerLauncher.java:123 (htps://ServerLauncher.java:123))
at net.fabricmc.installer.ServerLauncher.main([ServerLauncher.java:54 (htps://ServerLauncher.java:54))
(replace htps with https, it wouldn't let me post this otherwise)
If anyone knows what I'm doing wrong or if you need any more info lmk, I am very new to ubuntu so it might be something obvious I'm missing