6.5 HP StoreAll OS User Guide

as the Linux user “daemon” and group “daemon” (daemon:daemon), since that is the user the
HTTP Server acts as, for anonymous operations.
For retention properties assignment, the user must also have file system permission to navigate to
the directory containing the file defined in the URI. Additionally, the user must be the owner of the
file according to the file system’s properties for the file’s owning user. If these permissions are not
satisfied, the operation will not be allowed. Retention properties can never be assigned by
anonymous users on anonymous shares, but they can be assigned by authenticated users with
sufficient permissions, on anonymous shares.
File content transfer
Files can be uploaded and downloaded with the normal StoreAll HTTP shares feature with WebDAV
enabled, as described in earlier sections. In addition, the API defines an HTTP DELETE command
to delete a file. The delete command is only for WebDAV enabled shares.
Upload a file (create or replace)
This command transfers the contents of a file from the client to the HTTP share. If the file identified
does not already exist on the share, it will be created. If it already exists, the contents will be
replaced with the client’s file, if allowed by the file’s StoreAll permissions and retention properties.
Upload capability exists already in the StoreAll HTTP shares feature, and it is documented here
for completeness.
File creation and replacement is subject to StoreAll permissions on the file and directory, and it is
subject to retention settings on that file system. If it is denied, an HTTP error is returned.
The HTTP command is sent in the form of an HTTP PUT request.
HTTP syntax
The HTTP request line format is:
PUT /<urlpath>/<pathname> HTTP/1.1
[Sync-Requested: 1]
The file’s contents are supplied as the HTTP message body.
The equivalent curl command format entered on one line is:
curl -T <local_pathname>
http[s]://<IP_address>:<port>/<urlpath>/<pathname> [--header
"Sync-requested: 1]
The optional "Sync-Requested: 1" header is about durability. After the requested change has been
made to the file, a sync is done to ensure that the change has been made durably on disk before
the HTTP response is sent to the user. Note that this operation will wait until all buffers are flushed
to the disks before returning the operation result. If this header is requested, the HTTP response
will return a "Sync-Result" header. The value which follows that key represents the errno value,
where 0 (zero) means that sync was done successfully and any other value indicates sync did not
complete and durability is not guaranteed.
If the urlpath does not exist, an HTTP 405 error is returned with the message (Method Not
Allowed).
See “Using HTTP” (page 174) for information about the IP address, port, and URL path.
DescriptionParameter
The pathname of the file, stored on the client’s system, to be uploaded to the HTTP share.local_pathname
The pathname to be assign to the new file being created on the HTTP share, if the file
does not yet exist. If the file does exist, the file will be overwritten. The pathname should
be specified as a relative path from the <urlpath>, including the file’s name.
pathname
File content transfer 221