diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java index 5ceb3c1fb7a..541e82d2393 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/door/XrootdRedirectHandler.java @@ -850,6 +850,11 @@ protected XrootdResponse doOnDirList(ChannelHandlerContext ctx, _log.info("Listing directory {}", listPath); FsPath fullListPath = createFullPath(listPath); + + if (!_door.isReadAllowed(fullListPath)) { + throw new PermissionDeniedCacheException("Permission denied."); + } + if (request.isDirectoryStat()) { _door.listPath(fullListPath, request.getSubject(), _authz, new StatListCallback(request, fullListPath, ctx),