Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 60

Thread: HOWTO: Encrypted directory with EncFS

  1. #11
    Join Date
    Feb 2005
    Location
    Vancouver, BC
    Beans
    329

    Re: HOWTO: Encrypted directory with EncFS

    This is a pretty cool little app. Thanks for the howto. But I'm a little hazy on the decryption part. I couldn't find an answer about this on the encfs site.

    Let's say I put some files into the enc_tmp directory. They do show up, indeed, encrypted, in the /encrypyted directory. But what happens then -- because I now have two directories with these files in them. Do I delete/unmount the tmp directory, or what? If I delete files from the tmp directory, are they deleted in the encrypted directory? I guess what I'm looking for is a way to have the encrypted directory, then access it with the password, and not to have to worry that another directory (i.e. tmp) is showing the same files unencrypted. There does not seem to be a tutorial on the encfs site about all this, so please excuse my lack of knowledge. I'm just getting started with this whole encryption thing.


    Ross

    EDIT:

    I found this nice little CLI Magic tutorial, which helps quite a bit:

    http://www.linux.com/article.pl?sid=06/06/22/1332244
    Last edited by rosslaird; July 15th, 2006 at 07:01 PM. Reason: new info
    Ideas matter.
    Ross A. Laird

  2. #12
    Join Date
    Feb 2005
    Location
    Geneva, Switzerland
    Beans
    976

    Re: HOWTO: Encrypted directory with EncFS

    Thanks remmelt that's exactly what I needed !

    Here is a bunch of scripts to mount/unmount your encrypted directory with launchers in menu/panel. It uses zenity to provide a GUI password input and to display password failures.

    • Install zenity if you don't have it
      Code:
      $ sudo apt-get install zenity
    • Create a script for asking the password with zenity, I named it zenity.askpass and I put it in ~/bin
      Code:
      #! /bin/sh
      
      zenity --entry --text="Enter password:" --hide-text
    • Optionnal step: If you want your ~/bin in the PATH environnement variable (in order to type commands stored in that directory without providing the path), add at the end of /etc/bash.bashrc
      Code:
      #Set personal bin directory in PATH
      if [ -d ~/bin ] ; then
          PATH=~/bin:"${PATH}"
          export PATH
      fi
    • Create ~/bin/mount.encrypted
      Change /home/<your username>/.encrypted/ and /home/<your username>/encrypted/ according to your system.
      Note that I use the switch --idle=15 so my encrypted directory gets unmount if there is no activity after 15 minutes. Change the value or remove the switch for your needs.
      Code:
      #! /bin/sh
      
      out=`encfs --idle=15 --extpass=/home/<your username>/bin/zenity.askpass /home/<your username>/.encrypted/ /home/<your username>/encrypted/`
      if [ $? -gt 0 ] ; then
              zenity --error --text="$out"
      fi
    • Create ~/bin/umount.encrypted
      Change /home/<your username>/encrypted/ according to your system.
      Code:
      #! /bin/sh
      
      fusermount -u /home/<your username>/encrypted/
    • Make all the scripts executable
      Code:
      $ chmod +x ~/bin/zenity.askpass ~/bin/mount.encrypted ~/bin/umount.encrypted

    That's all !
    Now create your menu items or launchers and use mount.encrypted to mount your encrypted directory and umount.encrypted to unmount it.
    Last edited by Sam; August 24th, 2006 at 01:46 AM.

  3. #13
    Join Date
    Jun 2006
    Beans
    6

    Question Re: HOWTO: Encrypted directory with EncFS

    EncFS seems to be what I'm looking for, but I have one question (which seems to be in line with rosslaird's) :
    What will happen if, say, the power goes down while I'm using my encrypted partition or if I forgot to unmount the clear partition before switching off the computer ?
    Will my files stay in clear on my disc ? For greater security, should I add to the boot / halt sequence something about unmounting the partition ? (and how can I do this ?)
    Will setting the mountpoint in /tmp help (I think /tmp is emptied on halt, correct me if I am wrong) ?
    Last edited by Frédéric Perrin; August 21st, 2006 at 09:32 PM.

  4. #14
    Join Date
    Aug 2006
    Beans
    11

    Unhappy Re: HOWTO: Encrypted directory with EncFS

    Hello,All

    Please someone help me i was trying to do just this and i do
    have my 2 folders but when i try using them.

    this is what i get

    You do not have the permissions necessary to view the
    contents of "folder name"

    & why is it that when i do this i have to use sudo
    i don't see anyone else doing so.

    oh yes how do i delete the 2 folders i have now
    when i try i just get the above error so i can't delete them.

    Thank you

  5. #15
    Join Date
    Feb 2005
    Location
    Geneva, Switzerland
    Beans
    976

    Re: HOWTO: Encrypted directory with EncFS

    Quote Originally Posted by Frédéric Perrin View Post
    EncFS seems to be what I'm looking for, but I have one question (which seems to be in line with rosslaird's) :
    What will happen if, say, the power goes down while I'm using my encrypted partition or if I forgot to unmount the clear partition before switching off the computer ?
    Will my files stay in clear on my disc ? For greater security, should I add to the boot / halt sequence something about unmounting the partition ? (and how can I do this ?)
    Will setting the mountpoint in /tmp help (I think /tmp is emptied on halt, correct me if I am wrong) ?
    If you don't have a script at startup which mounts your encrypted folder, there is no need to worry. And about the halt sequence, there is no need to put an auto unmount script (in my opinion).

  6. #16
    Join Date
    Feb 2005
    Location
    Geneva, Switzerland
    Beans
    976

    Re: HOWTO: Encrypted directory with EncFS

    Quote Originally Posted by Razac View Post
    Hello,All

    Please someone help me i was trying to do just this and i do
    have my 2 folders but when i try using them.

    this is what i get

    You do not have the permissions necessary to view the
    contents of "folder name"

    & why is it that when i do this i have to use sudo
    i don't see anyone else doing so.

    oh yes how do i delete the 2 folders i have now
    when i try i just get the above error so i can't delete them.

    Thank you
    Did you add yourself to the fuse group ?
    Don't you inverted the hidden encrypted directory and the visible one when mounting ?
    To delete your two folders, use sudo
    Code:
    $ sudo rm -rf <directory>

  7. #17
    Join Date
    Aug 2006
    Beans
    11

    Angry Re: HOWTO: Encrypted directory with EncFS

    Hi,Sam

    Yes thank you it works now did as you said.
    may i ask please i am now trying the scripts
    you posted, but now having much luck.

    i get this error here

    Error decoding volume key,password incorrect

    Internal error: failed to exec program: No such file or directory
    22:44:53 (SSL_Cipher.cpp:375) newKey: BytesToKey returned 0, expecting 20 key bytes
    sh-3.1$ if [ $? -gt 0 ] ; then
    > zenity --error --text="$out"
    > fi
    sh-3.1$


    not sure what the script needs from me?? if you please
    can you tell me what you see in this error.

    Thank you

  8. #18
    Join Date
    Feb 2005
    Location
    Geneva, Switzerland
    Beans
    976

    Re: HOWTO: Encrypted directory with EncFS

    Quote Originally Posted by Razac View Post
    Hi,Sam

    Yes thank you it works now did as you said.
    may i ask please i am now trying the scripts
    you posted, but now having much luck.

    i get this error here

    Error decoding volume key,password incorrect

    Internal error: failed to exec program: No such file or directory
    22:44:53 (SSL_Cipher.cpp:375) newKey: BytesToKey returned 0, expecting 20 key bytes
    sh-3.1$ if [ $? -gt 0 ] ; then
    > zenity --error --text="$out"
    > fi
    sh-3.1$


    not sure what the script needs from me?? if you please
    can you tell me what you see in this error.

    Thank you
    I think you have made something wrong in the file ~/bin/mount.encrypted in the line:
    Code:
    out=`encfs --idle=15 --extpass=/home/<your username>/bin/zenity.askpass /home/<your username>/.encrypted/ /home/<your username>/encrypted/`
    Check that the path to zenity.askpass is ok and that the directories are the good ones and in the good order, and that you did not mispelled something.

  9. #19
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Encrypted directory with EncFS

    Couldn't you make a ramdisk and mount the unencrypted directory on that, that way if something happens and you lose power, the RAM is wiped and so is your unencrpyed data. Or is that being redundant and stupid cause I missed something?

  10. #20
    Join Date
    Jul 2006
    Beans
    809

    Re: HOWTO: Encrypted directory with EncFS

    Quote Originally Posted by Frédéric Perrin View Post
    EncFS seems to be what I'm looking for, but I have one question (which seems to be in line with rosslaird's) :
    What will happen if, say, the power goes down while I'm using my encrypted partition or if I forgot to unmount the clear partition before switching off the computer ?
    Will my files stay in clear on my disc ? For greater security, should I add to the boot / halt sequence something about unmounting the partition ? (and how can I do this ?)
    Will setting the mountpoint in /tmp help (I think /tmp is emptied on halt, correct me if I am wrong) ?
    To my knowledge EncFS encrypts per-file, so the worst that can happen is data loss for stuff that wasn't written to disk yet.

Page 2 of 6 FirstFirst 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •