Configure a Share With Rake Tasks

Use rake tasks to create, modify, and delete shares, and to configure share permissions.

Rake tasks must be run from the Shares shell, as described in the following steps:
  1. Go to the shares folder:
    > cd C:\Shares\www
  2. Test that your rake tasks are working correctly.
    > bundle exec rake -T
Tip: Square brackets in usage statements denote optional arguments and do not need to be included when running the commands.

Create Share

> bundle exec rake data:share:create -- --node_name node_name --share_name share_name --directory directory

For example:

> bundle exec rake data:share:create -- --node_name aspera --share_name share1 --directory /mnt

Delete Share

> bundle exec rake data:share:delete -- --share_name share_name

For example:

> bundle exec rake data:share:delete -- --share_name share1

Modify Share

Note: Uses the same syntax as create share. Change the values as needed to modify the attributes of the specified share.
> bundle exec rake data:share:create -- --node_name node_name --share_name share_name --directory directory

For example:

> bundle exec rake data:share:create -- --node_name aspera --share_name share1 --directory /mnt

Manage User's Share Permissions

> bundle exec rake data:user:share_permissions -- --username username --share_name share_name 
  [--permission true/false...]

Where valid permissions are:

  • browse_permission
  • download_permission
  • upload_permission
  • mkdir_permission
  • delete_permission
  • rename_permission
  • content_availability_permission
  • manage_permission

For example:

> bundle exec rake data:user:share_permissions -- --username users --share_name share1 
--upload_permission true --mkdir_permission true

Manage Group's Share Permissions

> bundle exec rake data:group:share_permissions -- --group_name group_name --share_name share_name
  [--group-type active_directory|local|saml]
  [--permission true/false...]

If --group-type is not specified, Shares assigns permissions to all groups with group_name.

Valid permissions are:

  • browse_permission
  • download_permission
  • upload_permission
  • mkdir_permission
  • delete_permission
  • rename_permission
  • content_availability_permission
  • manage_permission

For example:

> bundle exec rake data:group:share_permissions -- --group_name group1 --share_name share1 
  --upload_permission true --mkdir_permission true

Export Share Name and Associated Directory

> bundle exec rake data:share:export -- --path path/to/file

For example:

> bundle exec rake data:share:export -- --path /tmp/share_export.txt