SAFE as a mountable disk (safe-vfs): First version


#1

Hey guys, as I mentioned in this topic I created this mountable virtual file-system app for Linux.

Download / Install:

> wget “https://github.com/loureirorg/safe-vfs/raw/master/mount.safevfs
> chmod +x mount.safevfs

Usage:

> ./mount.safevfs /mnt/test

  • Where “/mnt/test” is your mounting point.

Example: Creating/publishing a website

mkdir public/my-dir
echo “Hello world!” > public/my-dir/index.html
mkdir dns/my-app
ln -s public/my-dir dns/my-app/www

Then open safe://www.my-app on your browser.

Folders:

  • /public: your public stuff (e.g. websites);
  • /private: your private, personal files;
  • /dns: your “domains”
  • /outside: shared folders from other users. To share a public folder, assign a domain to it first. Then other users can use “mkdir YOUR-DOMAIN” in the “outside” folder to see your shared files.

This is still beta and have some limitations:

  • ̶r̶e̶n̶a̶m̶e̶ ̶/̶ ̶m̶o̶v̶e̶ ̶d̶o̶e̶s̶n̶’̶t̶ ̶w̶o̶r̶k̶;̶
  • ̶i̶t̶’̶s̶ ̶i̶m̶p̶o̶s̶s̶i̶b̶l̶e̶ ̶t̶o̶ ̶s̶a̶v̶e̶ ̶a̶n̶ ̶e̶m̶p̶t̶y̶ ̶f̶i̶l̶e̶ ̶(̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶b̶e̶ ̶a̶n̶ ̶i̶s̶s̶u̶e̶ ̶o̶n̶ ̶S̶A̶F̶E̶ ̶A̶P̶I̶)̶;̶
  • security: when reading/writing files, a temporary copy will be made in the “/tmp” folder. If you shutdown the PC while working on these files, it’s possible that a copy will stay there;

GitHub: https://github.com/loureirorg/safe-vfs


UPDATE: rename / move it’s working now.
UPDATE II: “libruby.so.2.2” error fixed.
UPDATE III: “/outside” folder added.
UPDATE IV: “/dns” folder added.


10 key facts about SAFE Network
SAFE-VFS Update
SAFE Drive mounter for Windows, Mac, Linux
10 key facts about SAFE Network
SAFE had this a year ago
#2

Wow, rad. Not on linux so can’t test it, sadly :frowning:

If you ever want help testing on OSX though, give me a shout.


#3

This is fantastic :slight_smile: unfortunately I can’t play with it for a while :frowning:


#4

Holy greatness here !!

I’m struggling at getting ruby to behave, getting :
libruby.so.2.2: cannot open shared object file: No such file or directory

fiddling with rvm right now.
I did rvm install 2.2.0 and rvm use 2.2.0 --default , but it still complains about libruby.so.2.2 missing. I am not familiar with ruby, but it looks like my ruby install is local to my user, and your script is searching for the lib globally ?

EDIT 1

I made a dirty symlink ot /usr/lib64/ and now it works :slight_smile:

EDIT 2

I see public/ and private/ in /mnt/safetest :smiley:

This will be a really neat tool, it will make publishing or updating a breeze ! Congratulations for the great work @loureirorg !


#5

As far as I understand rvm is old hat these days. (which is not very far not being a ruby dev)

https://github.com/rbenv/rbenv is the modern version.

That said, changing from rvm to rbenv the other day for me was a HUUUGE PITA. So might not be worth the bother.


#6

What are the pre-requisites for this? Not familiar with Ruby.


#7

In theory you don’t need to install ruby to use it. Just download mount.safevfs and run it. You probably will need to install fuse although.


SAFE Rsync and Chunks etc
#8

Just out of curiosity, is your OS 32 or 64 bits?


#9

I have a 64bits fedora install.

Is there yet a way to mount with r/w access to regular users ? It seems I need to be root to launch the script, and also to read and write in the mountpoint.


#10

Interesting, it shouldn’t be required to you have ruby installed in order to use it. Are you using the mount.safevfs file? Or are you running​ the main.rb script? Also it should be working with non-root users. I’ll do some testings in a fedora setup to find why you are experiencing these issues.


#11

Tried on both Fedora and Debian both with fuse installed:
user@testing:~/Downloads/safe-vfs-master$ ./mount.safevfs ~/mountsafevfs-test/
user@testing:~/Downloads/safe-vfs-master$ /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfuse-1.1.2/lib/rfuse.rb:3:in require': libruby.so.2.2: cannot open shared object file: No such file or directory - /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfuse-1.1.2/lib/rfuse/rfuse.so (LoadError) from /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfuse-1.1.2/lib/rfuse.rb:3:in<top (required)>'
from /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfusefs-1.0.3/lib/fuse/rfusefs-fuse.rb:2:in require' from /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfusefs-1.0.3/lib/fuse/rfusefs-fuse.rb:2:in<top (required)>'
from /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfusefs-1.0.3/lib/rfusefs.rb:3:in require' from /tmp/selfextract.VwT6JP/lib/vendor/ruby/2.2.0/gems/rfusefs-1.0.3/lib/rfusefs.rb:3:in<top (required)>'
from main.rb:1:in require' from main.rb:1:in


#12

I’m on Windows 10/64 so can’t test. Just wanna say that I think it’s absolutely cool what you are doing :clap:.


#13

Gonna sleep now, it’s almost 4am here, but it seems that the rfuse.so file isn’t packed inside mount.safevfs. I’ll check this tomorrow.

Thank you guys for testing it!


#14

I am using the mount.safevfs file just like you instructed in the OP.

ok, I am figuring things out :

in order to use a mountpoint in the user home, I need to use an absolute path :

[user@host user]# ./mount.safevfs test/ fails , doesn’t find the folder “test/”

[user@host user]# ./mount.safevfs /home/user/test/ works.

Then, a regular user can access the mounted point and read / write stuff freely :slight_smile:


#15

What is this? You can test/simulate a SAFE network on a single volume through virtualization?
In the real world could this become a node swallower that helps weaken the network? Is this like droplets but with a single drive so no having to rent?


#16

No, this is about being able to access your SAFE files as if they were resident on a drive on your PC.


#17

sooooooo cooool!!! (>.< … being on a boat with very limited internet right now … the other people would kill me if i’d try it right away …)

@loureirorg you are my hero! :hugging: :heart_eyes:

I can’t wait to get home again to get it up and running!
using safe like a network storage is soooo great! (oh crap i’ll need a lot of coin in the first days to backup all my stuff …)


#18

Just think of it as an app that lets you store and access your files on the SAFE network. It works / will work just like any other hard drive that you have, except in this case the hard drive is virtual and the files actually live on the SAFE network.


#19

:smiley: It’s what makes the pied piper make your phone look like it has terrabytes of data, but none of it is on the phone, until you look at it and even then only in memory :wink:


#20

$30 android, 8 exabytes of storage :smiley: