How do I change the location of ~/Private and ~/.Private? (was: hardcoded paths are sinful)

Asked by Gionn on 2010-10-05

Binary package hint: ecryptfs-utils

Both mouting directory and crypted file folder are hardcoded as ~/Private and ~/.Private

My use case is to have a Private folder inside my Dropbox (dropbox.com), so both folders should be relocated from ~/ to ~/Dropbox.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ecryptfs-utils 83-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic-pae 2.6.35.4
Uname: Linux 2.6.35-22-generic-pae i686
NonfreeKernelModules: nvidia wl
Architecture: i386
Date: Tue Oct 5 21:11:17 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=it_IT.utf8
 SHELL=/bin/bash
SourcePackage: ecryptfs-utils

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ecryptfs-utils Edit question
Assignee:
No assignee Edit question
Last query:
2010-10-05
Last reply:
2011-03-09

This question was originally filed as bug #655319.

Gionn (giovanni.toraldo) said : #1
Dustin Kirkland  (kirkland) said : #2

Converting this to a question.

Dustin Kirkland  (kirkland) said : #3

Hmm, actually, you can change the name of the mountpoint easily to any directory you want (that you own), in the configuration file:
 ~/.ecryptfs/Private.mnt

I just did this to change the mount point:
 $ mkdir $HOME/Dropbox
 $ echo $HOME/Dropbox > $HOME/.ecryptfs/Private.mnt

And I did this to move the underlying data directory:
 $ mv $HOME/.Private $HOME/.Foobar
 $ ln -s $HOME/.Foobar $HOME/.Private

And then I used ecryptfs-umount-private and ecryptfs-mount-private to test it.

Worked like a charm.

Can you help with this problem?

Provide an answer of your own, or ask Gionn for more information if necessary.

To post a message you must log in.