@Override
public boolean setPermissions(final String resource, final String owner, final String group, final int mode, final List<ACEAider> aces) throws EXistException, PermissionDeniedException, URISyntaxException {
executeWithBroker(new BrokerOperation<Void>() {
@Override
public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
@Override
public void modify(Permission permission) throws PermissionDeniedException {
permission.setOwner(owner);
permission.setGroup(group);
permission.setMode(mode);