Apologies for asking something that seems like it should be so simple.
What else do I need to make a node that I create using  
JcrUtils.getOrCreateByPath(..) be writable from WebDAV?

adminResolver = resolverFactory.getAdministrativeResourceResolver(null);
adminSession = adminResolver.adaptTo(Session.class);
Node destinationNode = JcrUtils.getOrCreateByPath(destination, 
JcrConstants.NT_FOLDER, adminSession);
destinationNode.addMixin(JcrConstants.MIX_LOCKABLE);
destinationNode.addMixin(JcrConstants.MIX_VERSIONABLE);
adminSession.save();
Lock lock = lockManager.lock(destination, true, true, Long.MAX_VALUE, 
NimJcrConstants.INGEST_JOB_TOPIC);

VersionManager versionManager = workspace.getVersionManager();

versionManager.checkout(destination);

I'm calling a legacy library that expects a writable destination folder. I'm 
passing the WebDAV folder name and failing with:

java.io.FileNotFoundException: /mnt/jcr/test/test.txt (Permission denied)

The file system view shows the folder is owned by my UID rather than the UID of 
the sling daemon:
%> ls -ld /mnt/jcr/test
drwx------ 1 bedge staff 2048 Nov 25 16:05 /mnt/jcr/test

Can I set the file system permissions using javax.jcr?

-Bruce

Reply via email to