Use of service as unit disk

  1. s3fs Linux Installation
  • s3fs Ubuntu Installation
sudo apt install s3fs
  • s3fs CentOS Installation
yum install s3fs-fuse
  1. Create file which contains access data to OpenCayle Service
sudo echo ACCESS_KEY:ACCESS_KEY > <configuration file>
sudo chmod 600 <configuration file>

Example:

sudo echo ACCESS_KEY:ACCESS_KEY > ~/.passwd-s3fs
sudo chmod 600 ~/.passwd-s3fs

Where ACCESS_KEY will be changed by the access key of user on OpenCayle service.

  1. Map or mount the unit with the selected bucket
sudo s3fs <nombre bucket>  <relative path where bucket will be mounted>  passwd_file=<configuration file> -o url=https://ss3.scayle.es:443 -o use_path_request_style -o dbglevel=info

Before , check the unit where the bucket will be mounted exists:

mkdir <relative unit where bucket will be mounted> 
  • Example 1: The bucket bucket.empty.cephuser will be mounted on /s3mnt/bucket.
sudo s3fs bucket.empty.cephuser /s3mnt/bucket -o passwd_file=~/.passwd-s3fs -o url=https://ss3.scayle.es:443 -o use_path_request_style -o dbglevel=info
sudo ls -la /s3mnt/bucket
  • Example 2: The bucket new-bucket-7a7009d8 will be mounted on /s3mnt/bucket2.
sudo s3fs new-bucket-7a7009d8 /s3mnt/bucket2 -o passwd_file=~/.passwd-s3fs -o url=https://ss3.scayle.es:443 -o use_path_request_style -o dbglevel=info
sudo ls -la /s3mnt/bucket2
  1. Delete file which contains access data to OpenCayle Service
sudo rm -f ~/.passwd-s3fs
  1. Visualize the bucket
ls -la  <relative path where bucket will be mounted>

It is important you have on mind that the objects associated to the bucket will be hide due to they don't have any grant (nor read, nor write, nor execution for user, group or rest of users : privilege mask is 000).

  • Example 1:
sudo ls -la /s3mnt/bucket

total 9
drwx------ 1 root root    0 ene  1  1970 .
drwxrwxrwx 4 root root 4096 may 28 08:25 ..
---------- 1 root root 4128 may 26 10:15 data2.txt
  • Example 2:
sudo ls -la /s3mnt/bucket
total 9428377
drwx------  1 root root          0 ene  1  1970 .
drwxrwxrwx  4 root root       4096 may 28 08:25 ..
----------  1 root root 7554990080 mar 12 10:56 CentOS-8.1.1911-x86_64-dvd1.iso
----------  1 root root   33435278 mar 10 14:59 gromacs-2019.1.tar.gz
----------  1 root root 1994539008 mar 10 14:55 linuxmint-19-mate-64bit-v2(2).iso
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2(1).exe
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2.exe

To check the objects associated to the mount unit are right, you can use the Python program s3Resources.py:

python s3Resources.py XXXXX  (Where XXXXX is the access key to OpenCayle)
PARAMETERS: Access Key  <XXXXX>  
-----------------------------------------------------------------------------------------
                         Open Scayle Resources associated to user.  
-----------------------------------------------------------------------------------------
- BUCKET bucket.empty.cephuser 2020-05-22T11:29:59.485Z
   - OBJECT/KEY data2.txt   2020-05-26T08:15:46.958Z
- BUCKET bucket.link.cephuser 2020-05-21T12:01:56.898Z
   - OBJECT/KEY data2.txt   2020-05-27T11:10:01.292Z
- BUCKET new-bucket-104aa0ba 2020-03-12T09:17:52.434Z
- BUCKET new-bucket-7a7009d8 2020-03-10T13:54:09.058Z
   - OBJECT/KEY CentOS-8.1.1911-x86_64-dvd1.iso 2020-03-12T09:56:19.725Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2(1).exe    2020-03-10T13:59:35.482Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2.exe   2020-03-10T13:59:36.429Z
   - OBJECT/KEY gromacs-2019.1.tar.gz   2020-03-10T13:59:37.396Z
   - OBJECT/KEY linuxmint-19-mate-64bit-v2(2).iso   2020-03-10T13:55:26.902Z
-----------------------------------------------------------------------------------------
                         END Open Scayle Resources  
-----------------------------------------------------------------------------------------

  1. Delete an object from bucket
rm -f <relative path where bucket will be mounted>/<object name>
  • Example:
rm -f /s3mnt/bucket/data2.txt

sudo ls -la /s3mnt/bucket

total 5
drwx------ 1 root root    0 ene  1  1970 .
drwxrwxrwx 4 root root 4096 may 28 08:25 ..

To check the objects associated to the mount unit are right, you can use the Python program s3Resources.py:

python s3Resources.py XXXXX  (Where XXXXX is the access key to OpenCayle)
PARAMETERS: Access Key  <XXXXX>  
-----------------------------------------------------------------------------------------
                         Open Scayle Resources associated to user.  
-----------------------------------------------------------------------------------------
- BUCKET bucket.empty.cephuser 2020-05-22T11:29:59.485Z
- BUCKET bucket.link.cephuser 2020-05-21T12:01:56.898Z
   - OBJECT/KEY data2.txt   2020-05-27T11:10:01.292Z
- BUCKET new-bucket-104aa0ba 2020-03-12T09:17:52.434Z
- BUCKET new-bucket-7a7009d8 2020-03-10T13:54:09.058Z
   - OBJECT/KEY CentOS-8.1.1911-x86_64-dvd1.iso 2020-03-12T09:56:19.725Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2(1).exe    2020-03-10T13:59:35.482Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2.exe   2020-03-10T13:59:36.429Z
   - OBJECT/KEY gromacs-2019.1.tar.gz   2020-03-10T13:59:37.396Z
   - OBJECT/KEY linuxmint-19-mate-64bit-v2(2).iso   2020-03-10T13:55:26.902Z
  1. Add a new object to the bucket
vi <relative path where bucket will be mounted>/<object name>
  • Example:
sudo vi /s3mnt/bucket2/testmount.txt

sudo ls -la /s3mnt/bucket
total 9428377
drwx------  1 root root          0 ene  1  1970 .
drwxrwxrwx  4 root root       4096 may 28 08:25 ..
----------  1 root root 7554990080 mar 12 10:56 CentOS-8.1.1911-x86_64-dvd1.iso
----------  1 root root   33435278 mar 10 14:59 gromacs-2019.1.tar.gz
----------  1 root root 1994539008 mar 10 14:55 linuxmint-19-mate-64bit-v2(2).iso
-rw-r—r-- 8 root root         14 may 27 13:25 testmount.txt
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2(1).exe
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2.exe

To check the objects associated to the mount unit are right, you can use the Python program s3Resources.py:

python s3Resources.py XXXXX  (Where XXXXX is the access key to OpenCayle)
PARAMETERS: Access Key  <XXXXX>  
-----------------------------------------------------------------------------------------
                         Open Scayle Resources associated to user.  
-----------------------------------------------------------------------------------------
- BUCKET bucket.empty.cephuser 2020-05-22T11:29:59.485Z
   - OBJECT/KEY data2.txt   2020-05-26T08:15:46.958Z
- BUCKET bucket.link.cephuser 2020-05-21T12:01:56.898Z
   - OBJECT/KEY data2.txt   2020-05-27T11:10:01.292Z
- BUCKET new-bucket-104aa0ba 2020-03-12T09:17:52.434Z
- BUCKET new-bucket-7a7009d8 2020-03-10T13:54:09.058Z
   - OBJECT/KEY CentOS-8.1.1911-x86_64-dvd1.iso 2020-03-12T09:56:19.725Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2(1).exe    2020-03-10T13:59:35.482Z
   - OBJECT/KEY VeraCrypt Setup 1.23-Hotfix-2.exe   2020-03-10T13:59:36.429Z
   - OBJECT/KEY gromacs-2019.1.tar.gz   2020-03-10T13:59:37.396Z
   - OBJECT/KEY linuxmint-19-mate-64bit-v2(2).iso   2020-03-10T13:55:26.902Z
   - OBJECT/KEY testmount.txt   2020-05-28T13:55:26.902Z
-----------------------------------------------------------------------------------------
                         END Open Scayle Resources  
-----------------------------------------------------------------------------------------
  1. Modify an object from the bucket
vi <relative path where bucket will be mounted>/<object name>
  • Example:
sudo vi /s3mnt/bucket2/testmount.txt

sudo ls -la /s3mnt/bucket
total 9428377
drwx------  1 root root          0 ene  1  1970 .
drwxrwxrwx  4 root root       4096 may 28 08:25 ..
----------  1 root root 7554990080 mar 12 10:56 CentOS-8.1.1911-x86_64-dvd1.iso
----------  1 root root   33435278 mar 10 14:59 gromacs-2019.1.tar.gz
----------  1 root root 1994539008 mar 10 14:55 linuxmint-19-mate-64bit-v2(2).iso
-rw-r—r-- 8 root root         14 may 27 13:25 testmount.txt
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2(1).exe
----------  1 root root   35843168 mar 10 14:59 VeraCrypt Setup 1.23-Hotfix-2.exe

fusermount -u <unidad relativa donde se montará el bucket> 

Use S3 Browser software and configure it as it was explained on OpenCayle user guides.

Imagen1

Select the bucket and click on right button.

Select option “Mount as Window Drive” (First time you will go to TntDrive software download site).

Imagen2

Download free version of TntDrive software.
Access to TntDrive software.
Config the access to OpenCayle Service: Access Key ID and Secret Access Key will be the acccess key introduced on s3 browser which it is associated to the user and password of your user on OpenCayle service.

On Amazon S3 bucket you can introduce the bucket name, if you know it, or click on the folder to see all buckets you have on OpenCayle service.

Imagen3

Select a bucket and click OK to mount as unit disk.

Imagen4

Click OK and on the previous screen click on “Add New Drive” and pay attention to the mapped drive (on example unit Z:)

Imagen5

  • Open” : Open drive associated to bucket as a unit disk on the device. You can access to all objects contained on the bucket.
  • Edit” : Change user connection.
  • Clone” : Clone the mapping.
  • Delete” : Delete mapped drive.

Click on Open:

Imagen6

New object: Create a new object.
Example: create a new document from explorer o copy a file from another location.

Imagen7

Modify an object: Edit an object and update it.
Example: update a text file adding a new line on the beginning.

Imagen8

Delete an object; Delete a file.

Example: delete datanolink.txt

To verify go to a S3 Browser and check :

  • The new object “datamount.txt” exists.
  • The object “datanolink.txt” does not exist.
  • The updated object “data2.txt” was modified (Review last date).

Imagen9