Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #226963

Re: Two questions about LUKS in a file container

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Two questions about LUKS in a file container
Date 2020-09-13 17:20 +0200
Message-ID <AOBXj-71O-1@gated-at.bofh.it> (permalink)
References <AOgpP-2vB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat 12 Sep 2020 at 12:10:48 (-0400), rhkramer@gmail.com wrote:
> I'm thinking about putting my backup encrypted files in a LUKS filesystem within 
> a file instead of on a dedicated partition (for a few reasons).
> 
> I have two questions about that:
> 
>    * if I don't have that LUKS filesystem "mounted" and open and I write to it, 
> I assume (or hope) that nothing will get written and I will get a warning or 
> error message of some sort?

Create a permanent mount point with the permissions set to ugo=
ie nothing.

If you're afraid that root will read or write to it,
then instead use a script like the following:

. unlock the LUKS
. mkdir the mount point
. mount the filesystem

When finished with the container, another script:

. umount the filesystem
. rmdir the mount point
. lock the LUKS

To have the mount point cleaned up when you close down (forgetting to run
the latter script), make the mount point under /tmp.

>    * doesn't exactly apply to this situation, but, on the other hand, if my 
> "source" / original / non-backup LUKS system is in a file instead of on a 
> dedicated partition, and I use commands (like rsync or such) to copy the 
> unencrypted files not on the LUKS system, but I use options like the ones to 
> stay on the current filesystem (--one-file-system), I assume (or hope) that the 
> stuff in the encrypted partition will not get copied?

I assume that --one-file-system would notice that the encrypted
filesystem is read from /dev/dm-*, whereas the container file is
being read from /dev/sd*, and would avoid using the former.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Two questions about LUKS in a file container rhkramer@gmail.com - 2020-09-12 18:20 +0200
  Re: Two questions about LUKS in a file container Hans <hans.ullrich@loop.de> - 2020-09-12 18:50 +0200
  Re: Two questions about LUKS in a file container Bob Weber <bobrweber@gmail.com> - 2020-09-12 21:10 +0200
    Re: Two questions about LUKS in a file container Andrei POPESCU <andreimpopescu@gmail.com> - 2020-09-16 11:00 +0200
      Re: Two questions about LUKS in a file container David Christensen <dpchrist@holgerdanske.com> - 2020-09-16 22:00 +0200
        Re: Two questions about LUKS in a file container David Wright <deblis@lionunicorn.co.uk> - 2020-09-16 23:40 +0200
          Re: Two questions about LUKS in a file container David Christensen <dpchrist@holgerdanske.com> - 2020-09-17 22:40 +0200
            Re: Two questions about LUKS in a file container David Wright <deblis@lionunicorn.co.uk> - 2020-09-19 17:00 +0200
              Re: Two questions about LUKS in a file container David Christensen <dpchrist@holgerdanske.com> - 2020-09-19 23:10 +0200
              Re: Two questions about LUKS in a file container Andrei POPESCU <andreimpopescu@gmail.com> - 2020-09-21 08:00 +0200
                Re: Two questions about LUKS in a file container David Wright <deblis@lionunicorn.co.uk> - 2020-09-21 16:30 +0200
  Re: Two questions about LUKS in a file container Charles Curley <charlescurley@charlescurley.com> - 2020-09-12 21:40 +0200
    Re: Two questions about LUKS in a file container David Christensen <dpchrist@holgerdanske.com> - 2020-09-13 01:00 +0200
  Re: Two questions about LUKS in a file container David Christensen <dpchrist@holgerdanske.com> - 2020-09-13 00:20 +0200
    Re: Two questions about LUKS in a file container rhkramer@gmail.com - 2020-09-13 02:10 +0200
  Re: Two questions about LUKS in a file container David Wright <deblis@lionunicorn.co.uk> - 2020-09-13 17:20 +0200
    Re: Two questions about LUKS in a file container David <bouncingcats@gmail.com> - 2020-09-13 17:30 +0200

csiph-web