beautypg.com

HP StoreAll Storage User Manual

Page 207

background image

The %5C is the URL encoding for a backslash.

2.

Set the permissions of the container.

A container is always created with read-write permission by the account user and no permission
for any other user. This is represented in UNIX octal permissions as 700 (a digit for user,
group, and other permissions). These permissions can be changed by the account user to
allow other users to read and write objects in the container. Change the "group" permission
of the container to allow other users in the same default group as the account user to read
and/or write objects. Change the "other" permission to allow any user to read and/or write
objects. The execute bit must be set to allow read or write access. The read and write bits can
be set as needed.

The permissions can be entered as an integer in standard UNIX octal permissions format,
between the range 0 to 777. A two-digit permission, such as 77, would be considered to be
077, as single-digit permission, such as 7, would be considered to mean 007.

NOTE:

Enter the following commands on one line.

curl -X PUT http:///

//?permission -u

: --header "x-ibrix-permission:"

In this instance is the integer permission value in octal, for example 770.

HTTP version of the command

PUT ///?permission HTTP/1.1

x-ibrix-permission:

3.

Add items to your newly created container.

NOTE:

Enter the following commands on one line.

To create an empty object in your new container, enter the following command:

NOTE:

Object names support UTF-8.

curl -X PUT http://////<object_id> --user

: [--header "Sync-Requested: 1"]

The object ID can be any string uniquely identifying the object in this container. See
Object ID in

Table 27 (page 203)

for details.

An example of the command:

curl -X PUT http://192.168.2.2/obj/localuser1/

container-a/mydir1/mysubdir2/myobj.xyz -u localuser1:mypassword

To upload an object to your new container, enter the following command:

curl -T http://////
-u :

For example:

curl -T C:\temp\myLocalFile.txt http://192.168.2.2
/obj/localuser1/container-a/mydir1/mysubdir2/myobj.xyz -u localuser1:mypassword

In this example, the user installed the open source cURL program on their Windows
computer.

The subdirectories /mydir1/mysubdir2 provided as an example in the command are
the virtual location of the myobj2.xyz file. The file path for the uploaded file is converted
into the hash name for the file object. If you used the CLI to traversed the directory structure
of the container, you would find myobj2.xyz stored under the first and second level
hash directories under the container instead of under the subdirectories specified during
the upload.

HTTP version of the command

Using the HTTP StoreAll REST API object mode 207