Closed ScrelliCopter closed 11 months ago
Sadly there does not appear to be a nice way to use Files.walk()
streams while ignoring errors.
Switched to walkFileTree
, this does not benefit from parallel stream things, will have to look into it more another time.
Closing, feel free to reopen if its still an issue
Serversync Version:
v4.2.0
Minecraft Version:
Not particularly relevant but 1.19 w/ Fabric
Issue:
We run ServerSync in the same directory as our Minecraft server and ServerSync is running under a separate user to the main Minecraft process. It appears on version upgrades WorldEdit will create a transitory directory under
config/worldedit/.archive-unpack/<some unique 8 char alphanum>
with the unfortunate permissions ofdrwx------
. ServerSync's file scan appears to recurse into folders that aren't included or are ignored, which is fair enough. But if it runs into directories that the user has insufficient privileges to access it will throw ajava.nio.file.AccessDeniedException
shortly after logging[ServerSync] INFO: Server configured to push client only mods, clients can still refuse these mods!
and die. Since it's seemingly not possible to completely exclude a path from scanning the only fix is to manually fix the permissions or delete the offending directory. I think a better behaviour would be to log a warning about inaccessible directories, or perhaps only fail with a fatal error for dirs that fall under included/non-ignored rules.Full exception: