if (mount.getPermissions().containsKey(SshThread.getCurrentThreadUser())) {
perm = (VFSPermission) mount.getPermissions().get(SshThread.getCurrentThreadUser());
} else if (mount.getPermissions().containsKey("default")) {
perm = (VFSPermission) mount.getPermissions().get("default");
} else {
throw new PermissionDeniedException(
"No permissions set for mount");
}
if (!perm.verifyPermissions(permissions)) {
throw new PermissionDeniedException("Permission denied for " +
translateNFSPath(path));
}
} else {
permissionHandler.verifyPermissions(username, path, permissions);
}