Arbutus object storage clients: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 80: Line 80:


Where the bucket name and the file name are specified.  Multipurpose Internet Mail Extensions (MIME) is a mechanism for handling files based on their type. The <code>--guess-mime-type</code> command parameter will guess the MIME type based on the file extension.  The default MIME type is <code>binary/octet-stream</code>.
Where the bucket name and the file name are specified.  Multipurpose Internet Mail Extensions (MIME) is a mechanism for handling files based on their type. The <code>--guess-mime-type</code> command parameter will guess the MIME type based on the file extension.  The default MIME type is <code>binary/octet-stream</code>.
=== Delete File ===
To delete a file from the bucket, use the  <code>rm</code> command similar to this:
<code>$ s3cmd rm s3://BUCKET_NAME/FILE_NAME.dat</code>


=== ACLs and Policies ===
=== ACLs and Policies ===
Buckets can have Access Control Lists (ACLs) and policies which govern who can access what resources in the object store.  These features are quite sophisticated.  Here are two simple examples of using ACLs using the tool's <code>setacl</code> command.
Buckets can have Access Control Lists (ACLs) and policies which govern who can access what resources in the object store.  These features are quite sophisticated.  Here are two simple examples of using ACLs using the tool's <code>setacl</code> command.


<code>$ s3cmd setacl --acl-public s3://BUCKET_NAME/</code>
<code>$ s3cmd setacl --acl-public -r s3://BUCKET_NAME/</code>


The result of this command is that anyone can access the bucket and the files in the bucket.  Files can be accessed via URLs such as<br/>
The result of this command is that the public can access the bucket and recursively (-r) every file in the bucket.  Files can be accessed via URLs such as<br/>
https://object-arbutus.cloud.computecanada.ca/BUCKET_NAME/FILE_NAME.dat.
https://object-arbutus.cloud.computecanada.ca/BUCKET_NAME/FILE_NAME.dat.


cc_staff
172

edits

Navigation menu