I am trying to mount a nas drive in ubuntu 16.04, then create an encfs mount from that for uploading the encrypted contents to the cloud.

/mnt/nas  #decrypted (NFS mount from the NAS)
/mnt/.nas #encrypted (encrypted on local file system using decrypted data from NAS mount)

The first mount works fine:

sudo mount /mnt/nas/

I can see the contents just fine in that mount. Then I try to encrypt it with encfs:

echo 'MYPASSWORD' | ENCFS6_CONFIG='/home/user/encfs.xml' encfs -o allow_other -S /mnt/.nas/ /mnt/nas/

And it returns this error:

fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
fuse failed.  Common problems:
 - fuse kernel module not installed (modprobe fuse)
 - invalid options -- see usage message

So I modify my command:

echo 'MYPASSWORD' | ENCFS6_CONFIG='/home/user/encfs.xml' encfs -o allow_other,nonempty -S /mnt/.nas/ /mnt/nas/

This time there is no error, but when I look at the either /mnt/.nas or /mnt/nas, they both show empty. When I umount the drive like this

sudo umount /mnt/nas/

The /mnt/nas/ path shows all the NAS files again. When I run the exact command a second time, it removes the mount with the NAS.

I will also add, I tried mounting encfs first, THEN mounting the NAS drive. In that case, I can see the files in /mnt/nas but /mnt/.nas is empty.

Here's the contents of /etc/exports on the NAS. This was setup via the Synology UI.

/volume1/filestorage *(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)

I have had encfs working fine on this server for a while now using the .encfs6.xml file I generated just fine for months. The only difference is I purchased a NAS and started moving all files there for local backup. So instead of running encfs on local encrypted and decrypted directories, the decrypted directory is now an NFS mount from the NAS, and the encrypted files are in a local path on ubuntu.

How do I mount the NAS decrypted files, then use encfs to encrypt them to be uploaded to the cloud from the Ubuntu server?

EDIT Tried same process with sshfs & encfs, same result.


You need --reverse, see https://github.com/vgough/encfs/blob/master/encfs/encfs.pod:

With --reverse it takes as source plaintext data and produces enciphered data on-demand.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.