1

I was searching for a solution to mount an encrypted folder on my synology nas via terminal and found out that DSM uses ecryptfs. Using mount.ecryptfs $ENCRYPT_DIR_PATH $MOUNTED_DIR_PATH actually works but the mounted directory with decrypted data doesn't show in the samba shares or in the web GUI. Further i found out that synology made a program/script to solve this. synoshare --enc_mount $ENCRYPT_DIR_PATH $PASSWORD should mount the folder and make it visible but sadly it crashes.

Error SYNOShareEncShareMount() failed.[0x1400 share_db_get.c:31]

Does anyone know what the problem is here?


SECURITY WARNING:

Someone who searches a way to do this might stumble upon this thread, so i want to warn you about something i read here. If you use synoshare --enc_mount $ENCRYPT_DIR_PATH $PASSWORD your password will be in plain text on the terminal and also in /var/log/bash_history.log which is obviously a security flaw. If you scroll down on the linked page you find a post from user fairlane in which he wrote a small script to use synoshare without revealing the password. For the sake of completeness i post it here.

echo -n "Enter Share Password: "
read -s passwordVariable
echo ""
/usr/syno/sbin/synoshare --enc_mount $1 $passwordVariable
  • 1
    I think you should add to the security warning section that the password you provide with this solution will still be visible in /var/log/auth.log. So anyone with root access to the system will be able to also find your encryption password(s). Now, one could of course in a normal home environment assume that strangers do not have root and it would be good enough. A persistent person with physical access may be able to extract /var/log/auth.log from the system, rendering the encryption useless. – mabahj Mar 28 at 19:39
0

I found out what was wrong. Instead of using synoshare --enc_mount $ENCRYPT_DIR_PATH $PASSWORD you use it like synoshare --enc_mount $SHARE_NAME $PASSWORD. So you have to put the actual name of the share using " " as argument instead of the concrete path.

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.