Configure a Share With Rake Tasks

Rake tasks can be used to configure and manage IBM Aspera Shares on Demand users, groups, shares, and nodes from the command line. To run a rake task, first do the following:
  1. Go to the shares folder:
    # cd /opt/aspera/shares/u/shares/bin
  2. Test that your rake tasks are working correctly.
    ./run rake -T

The following rake tasks cover how to create, modify, and delete a share and how to manage a user or group's share permissions.

Tip: Square brackets in usage statements denote optional arguments and need not be included when running the commands.

Create Share

Command Usage
Syntax
rake data:share:create -- --node_name node_name --share_name share_name --directory directory
Example
./run rake data:share:create -- --node_name aspera --share_name share1 --directory /mnt

Delete Share

Command Usage
Syntax
rake data:share:delete -- --share_name share_name
Example
./run rake data:share:delete -- --share_name share1

Modify Share

Note: Same syntax as create share. Change the values as needed to modify the attributes of a share with the specified name.
Command Usage
Syntax
rake data:share:create -- --node_name node_name --share_name share_name --directory directory
Example
./run rake data:share:create -- --node_name aspera --share_name share1 --directory /mnt

Manage User's Share Permissions

Command Usage
Syntax
rake data:user:share_permissions -- --username username --share_name share_name 
  [--INSERT DESIRED PERMISSION true or false --INSERT DESIRED PERMISSION true or false ...]
Where valid permissions are:
  • browse_permission
  • download_permission
  • upload_permission
  • mkdir_permission
  • delete_permission
  • rename_permission
  • content_availability_permission
  • manage_permission
Example
./run rake data:user:share_permissions -- --username users --share_name share1 
--upload_permission true  --mkdir_permission true

Manage Group's Share Permissions

Command Usage
Syntax
rake data:group:share_permissions -- --group_name group_name --share_name share_name 
  [--INSERT DESIRED PERMISSION true or false --INSERT DESIRED PERMISSION true or false ...]
Where valid permissions are:
  • browse_permission
  • download_permission
  • upload_permission
  • mkdir_permission
  • delete_permission
  • rename_permission
  • content_availability_permission
  • manage_permission
Example
./run rake data:group:share_permissions -- --groupname users --share_name share1 
  --upload_permission true  --mkdir_permission true

Export Share Name and Associated Directory

Command Usage
Syntax
./run rake data:share:export -- --path path/to/file
Example
./run rake data:share:export -- --path /tmp/share_export.txt