-
Notifications
You must be signed in to change notification settings - Fork 66
How to set permission on the "/" directory for WebDAV Server #496
Comments
When you say the developer role is not able to access WebDAV, do you mean they can connect but don't see anything? That might be a matter of permissions, but also make sure you set the database's directory creation to automatic. (Note that changing that setting on an existing database may not solve your problem.) Roxy defaults to manual directory creation. This matters because having URIs that start with "/" does not guarantee that you have a "/" directory. Try running xdmp:directory-create() in Query Console, specifying the permissions you need. If it doesn't throw XDMP-DIREXISTS, that was likely the problem. |
Yes the developers able to connect but they are not able to see any thing.It just gives 404. Also the directory creation for Modules Database is Automatic where as Content database is Manual. Here we are exposing our Modules Database in the WebDav for Development. But after running the below Query in the Query Console. They are able to see the files in WebDav for Modules DB xdmp:document-add-permissions("/",xdmp:permission("Read_only_Access","read")) xdmp:document-add-permissions("/",xdmp:permission("Write_only_Access",("read", "insert","execute","update")) |
Seems reasonable to do that while setting up the modules database. We'd welcome a pull request, or for the short term, you could implement that as a custom command. |
Perhaps adding something like this to app_specific.rb helps: alias_method :original_deploy_src, :deploy_src
def deploy_src()
original_deploy_src
# change module permissions
r = execute_query %Q{
xquery version "1.0-ml";
for $uri in cts:uris()
return (
$uri,
xdmp:document-set-permissions($uri, (
xdmp:permission("#{@properties["ml.app-name"]}-read-role", "read"),
xdmp:permission("#{@properties["ml.app-name"]}-execute-role", "execute")
))
)
},
{ :db_name => @properties["ml.modules-db"] }
end |
Thank you for the inputs. I will implement and test it |
Considering if there is anything we could change in Roxy to make this easier, but can't think of anything. Modules has directory-creation set to automatic by default in Roxy, and we always apply doc-permissions for at least app-role. That should be sufficient out of the box. Closing this ticket. |
Hi,
I am setting up the Project on our Dev Environment using Roxy. We use Oxygen XML Developer as the Development tool. I have defined the developer role in the ml-config.xml. The developer is able to connect to the database in Oxygen but not able to access WebDAV . I found in the MarkLogic Knowledge base that we have Set Permission on the "/" directory.
https://help.marklogic.com/Knowledgebase/Article/View/252/0/read-only-access-user-for-webdav
So please help me how to configure the WebDAV with Permission on the "/" directory
Here is the WebDAV configuration for the modules DB
The text was updated successfully, but these errors were encountered: