Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Encrypting a folder
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dragonuv
n00b
n00b


Joined: 06 Jun 2010
Posts: 55

PostPosted: Sat Apr 09, 2011 3:06 pm    Post subject: Encrypting a folder Reply with quote

Hi,

I'm interesting in encrypting a folder in my local HD, I was thinking about an encrypted loopback device I mount each time I want to access its contents but the disadvantage is that I have a backup server at my house and if I had not unmounted the device it could copy its contents into the server.
I was looking for a more successful method, I would be grateful if someone could offer a decent method.

Thanks :)
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Sat Apr 09, 2011 3:50 pm    Post subject: Reply with quote

Autounmount every few hours automatically?
_________________
My blog
Back to top
View user's profile Send private message
dragonuv
n00b
n00b


Joined: 06 Jun 2010
Posts: 55

PostPosted: Sat Apr 09, 2011 4:00 pm    Post subject: Reply with quote

That's a risk I can't afford. what if I mount the second the backup server decides to backup my computer?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21822

PostPosted: Sat Apr 09, 2011 5:23 pm    Post subject: Reply with quote

Configure your backup not to cross mount points. That way, if it runs while the device is mounted, it will at most copy the owner/permissions of the mount point, but none of the contents. If you hide the mount inside an area that is normally not archived, such as a temporary directory, you can avoid even that problem.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Sat Apr 09, 2011 5:31 pm    Post subject: Reply with quote

Hu wrote:
Configure your backup not to cross mount points.
Even simpler (But I assume not possible) you could try to exclude the mount point/directory.
Back to top
View user's profile Send private message
dragonuv
n00b
n00b


Joined: 06 Jun 2010
Posts: 55

PostPosted: Sat Apr 09, 2011 7:14 pm    Post subject: Reply with quote

Hu wrote:
Configure your backup not to cross mount points.


good idea, how is it done?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Sat Apr 09, 2011 7:40 pm    Post subject: Reply with quote

I suggest to use ecryptfs, and make your backup script only copy the crypted files subdirectory.
Back to top
View user's profile Send private message
dragonuv
n00b
n00b


Joined: 06 Jun 2010
Posts: 55

PostPosted: Sat Apr 09, 2011 7:51 pm    Post subject: Reply with quote

chithanh wrote:
I suggest to use ecryptfs, and make your backup script only copy the crypted files subdirectory.


please explain? how is ecryptfs better than a loopback device? and how do i make my backup script do that?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21822

PostPosted: Sat Apr 09, 2011 8:21 pm    Post subject: Reply with quote

dragonuv wrote:
good idea, how is it done?
That depends on what tool is collecting the list of files to archive. You have not told us yet how you pick which files are in and which are out. If you are using find ... -print0 | tar --null -T - ..., then add -xdev to your find. If you are letting tar pick files, add --one-file-system. If you are using some other mechanism, please describe it.
Back to top
View user's profile Send private message
dragonuv
n00b
n00b


Joined: 06 Jun 2010
Posts: 55

PostPosted: Sat Apr 09, 2011 8:44 pm    Post subject: Reply with quote

Actually I have not decided yet how the backup system will work. probably a bash script that will copy the content of the whole filesystem to a local folder. I just didn't want the script to include entries of folders that should't be copied
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum