EssentialsX

EssentialsX

2M Downloads

[1.20.4, linux] /backup: java.io.IOException, Error 13 permission denied

minelolpride opened this issue ยท 1 comments

commented

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=2cdd5ba63b69473cbfafb67dbfa0af76

Error log (if applicable)

No response

Bug description

I have a backup script set up with Essentials here to make an archive of the worlds folder weekly on my linux server. At some point the plugin stopped being able to run the script even though file permissions are untouched since it was last seen working (i checked). I utilize a separate user to run the server and all related files and folders are accessible, readable, writable to it. Not sure if this may change anything here, but it's part of the getup. I noticed this on stable 2.20.1, and it still occurs on the latest dev version as of about 20 minutes ago.

Steps to reproduce

  1. Create a script that should be executed when running /backup
  2. Configure essentials to point to the created script
  3. Reload essentials or restart server
  4. Run /backup

Expected behaviour

The backup script configured should be executed.

Actual behaviour

Error in console (my script is named here):

[20:28:46 ERROR]: [Essentials] An error occurred while building the backup child process
java.io.IOException: Cannot run program "wbackup.sh": error=13, Permission denied
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) ~[?:?]
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) ~[?:?]
        at com.earth2me.essentials.Backup.lambda$run$1(Backup.java:93) ~[EssentialsX-2.21.0-dev+71-3817a11.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.4.jar:git-Purpur-2154]
        at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.4.jar:git-Purpur-2154]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.4.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:842) ~[?:?]
Caused by: java.io.IOException: error=13, Permission denied
        at java.lang.ProcessImpl.forkAndExec(Native Method) ~[?:?]
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:314) ~[?:?]
        at java.lang.ProcessImpl.start(ProcessImpl.java:244) ~[?:?]
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ~[?:?]
        ... 8 more
commented

Permission denied means that it is not able to run the script. You said this was working before, so likely something changed in between then and now. If you need help, I would join the Discord server for community support in your case.