Hubic è un servizio di cloud con 10 tera per solo 5 euro al mese.
Ho avuto la necessità di montare il mio account su linux con hubicmount
Prima di tutto installo le dipendenze
apt-get install build-essential libcurl4-openssl-dev libxml2-dev libssl-dev libfuse-dev libjson0-dev pkg-config libmagic-dev
- scarico il fasthubicfuse da https://github.com/dan-cristian/fasthubicfuse con il comando git clone https://github.com/dan-cristian/fasthubicfuse
- con questo comando si crea una directory sotto al cartella dell’utente di lavoro pertanto entrate in fasthubicfuse e date
$ ./configure make sudo make install
- per montare si usa il comando
sudo hubicfuse /mnt/hubic -o noauto_cache,sync_read,allow_other
- se si vuole puoi modificare fstab per il montaggio automatico dopo il reboot
/etc/fstab: hubicfuse /mnt/hubic fuse user,noauto 0 0
- crea il gruppo e aggiungi l’utente
$ sudo addgroup fuse
$ sudo usermod -a -G fuse [username]
soc@server:~# cat /.hubicfuse
# Here is what your app needs to connect to hubiC:
client_id=api_hubic_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
refresh_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
soc@server:~# chmod 600 ./.hubicfuse
- Eseguire lo script ./hubic_token
soc@server:~/fasthubicfuse# ./hubic_token
client_id (the app‘s id): api_hubic_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
client_secret (the app‘s secret): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
redirect_uri (declared at app‘s creation): https://phil.writesthisblog.com/
For the scope –what you authorize your app to do–, enter characters as suggested
in parenthesis, or just hit return if you don‘t need the item authorized.
Get account usage (r): r
Get all published links in one call (r): r
Get OpenStack credentials, eg. access to your files (r): r
Send activation email (w): w
Add new/Get/Delete published link (wrd): wrd
user_login (the e–mail you used to subscribe): xxxxxxxxxx@xxxxxxx.xx
user_pwd (your hubiC‘s main password):
Success!
# Here is what your app needs to connect to hubiC:
client_id=api_hubic_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
refresh_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- per testare i collegamenti puoi usare i seguenti comandi
soc@server:~# dd if=/dev/zero of=/mnt/hubic/default/Documents/test bs=512k count=200
200+0 records in
200+0 records out
104857600 bytes (105 MB) copied, 14.408 s, 7.3 MB/s
soc@server:~# dd if=/dev/zero of=/mnt/hubic/default/Documents/test bs=100M count=1
1+0 records in
1+0 records out
104857600 bytes (105 MB) copied, 8.61703 s, 12.2 MB/s
soc@server:~# dd if=/mnt/hubic/default/Documents/test of=/root/test bs=512k count=200 bs=512k count=200
200+0 records in
200+0 records out
104857600 bytes (105 MB) copied, 4.15439 s, 25.2 MB/s