eXist-db / xst

Command line tool to interact with exist-db instances
https://npmjs.com/@existdb/xst
MIT License
18 stars 5 forks source link

What about permissions? #39

Open cwittern opened 2 years ago

cwittern commented 2 years ago

Please make sure that the feature you are suggesting is reported in the right place. Documentation, Dashboard etc all have their own repos. Suggestion for new features should be posted there.

Is your feature request related to a problem? Please describe. When uploading, the permissions are set from the uploading users permissions. It would be nice to be able to specify a target for permissions of the uploaded files Describe the solution you'd like I would like to see a config option that allows setting permissions for the target Describe alternatives you've considered I could also run a xquery on the server to fix this, but getting it in one run would be much nicer :-) Additional context Not really, but this is a nifty tool!

line-o commented 1 year ago

Glad, you like it @cwittern there is plenty more to come see #22

line-o commented 1 year ago

@duncdrum requested a feature that might solve your problem as well:

A set of commands xst chmod, xst chown, xst chgrp that align with unix command line tools to set mode, owner and group. With the option to do this recursively and with --include and --exclude patterns. This would allow for more fine grained control of the permissions and cover plenty of additional use-cases.

For now it is best to rely on the permissions setting features of the package installation routines.

I could also run a xquery on the server to fix this

This can also be done on the command line now with xst run.

xst run 'sm:chmod(xs:anyURI($file), "rwxrwxr-x")' -b '{"file": "/db/apps/my-app/controller.xq"}'