Results 1 to 10 of 10

Thread: How to encrypt and password protect a directory?

  1. #1
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    185
    Distro
    Ubuntu 18.04 Bionic Beaver

    How to encrypt and password protect a directory?

    Hello all,

    What would be the best way to password protect a directory under "/home/<user>/"?

    It doesn't need to be fort Knox but some authentication by password and a bit of encryption maybe in case I get hacked or something? I don't really know much about encryption beyond the basics but I believe authentication and encryption are not the same thing?

    Any help is much appreciated!

  2. #2
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to encrypt and password protect a directory?

    Is this for saving passwords (only) or for saving various data files?

    I'm asking because there are special solutions for saving passwords (that are more convenient than a general solution).

    Otherwise LUKS encryption can be used.

  3. #3
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,782

    Re: How to encrypt and password protect a directory?

    In Ubuntu, the file manager (Files) can encrypt a file or folder for you. When encryption is set up, you get an "Encrypt" option when you right-click on a file or folder. See this guide to setting up the ecryption:

    https://www.techrepublic.com/article...-file-manager/

    (Note: simplest encryption is to use the 'shared passphrase' option instead of using encryption keys.)

  4. #4
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    185
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to encrypt and password protect a directory?

    Quote Originally Posted by sudodus View Post
    Is this for saving passwords (only) or for saving various data files?
    It's just for regular files, but I have also been considering a location in which I can store some of my less sensitive passwords, so I'd be interested to hear about that too

  5. #5
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to encrypt and password protect a directory?

    This link: KeePass Password Safe should be useful for general information.

    More specifically for Ubuntu, I think KeePassXC is what you'd want. You can download it or install it from the repository Universe (version 2.3.1) or from a PPA (version 2.61) or snap.

  6. #6
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,605
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: How to encrypt and password protect a directory?

    Quote Originally Posted by jcdenton1995 View Post
    What would be the best way to password protect a directory under "/home/<user>/"?
    I use Sirikali for this. You will find it in the "Universe" repositories of recent Ubuntu releases.

    The project's homepage is here:
    https://mhogomchungu.github.io/sirikali/

  7. #7
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    185
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to encrypt and password protect a directory?

    Thanks, this looks good. I'll give it a whirl!

  8. #8
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    185
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to encrypt and password protect a directory?

    Cheers, I'll give it a try as I'm awful with passwords and pretty much just change them every time I log into a site that I don't use often enough to have the password burned into my brain. I still think the best place for sensitive passwords is on a piece of paper kept in some obscure place around the house though

  9. #9
    Join Date
    Apr 2020
    Location
    where the work takes me
    Beans
    185
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How to encrypt and password protect a directory?

    Quote Originally Posted by Dennis N View Post
    In Ubuntu, the file manager (Files) can encrypt a file or folder for you. When encryption is set up, you get an "Encrypt" option when you right-click on a file or folder. See this guide to setting up the ecryption:

    https://www.techrepublic.com/article...-file-manager/

    (Note: simplest encryption is to use the 'shared passphrase' option instead of using encryption keys.)
    Thanks, I've just installed seahorse-nautilus and encrypted / decrypted with it, but what I can't understand is why when I encrypt a file with the shared passphrase option, it generates the encrypted file, however I can just decrypt it without using the passphrase? I don't think I fully understand how it works...

  10. #10
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    4,782

    Re: How to encrypt and password protect a directory?

    Quote Originally Posted by jcdenton1995 View Post
    Thanks, I've just installed seahorse-nautilus and encrypted / decrypted with it, but what I can't understand is why when I encrypt a file with the shared passphrase option, it generates the encrypted file, however I can just decrypt it without using the passphrase? I don't think I fully understand how it works...
    I've noticed that too, and imagine it's a tradeoff between convenience and security. Suppose you had 20 files to decrypt. Is it better to require the user to re-enter a long passphrase for each one, or allow the passphrase authentication persist during the same user session with Nautilus open? I would think if you closed Nautilus after decrypting a file, reopened it, and tried to decrypt another, you would have to re-enter the passphrase. That would be something to find out. There may be a time limitation too in any session.

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
  •