I've recently installed Ubuntu 12.04 LTS (minimal virtual machine) on a VPS host. I've encrypted the virtual disk and encrypted the home directory of my main user account, that I'm using to access the install through SSH (using public key authentication). So far, so good.
The thing is: I can't figure out what exact action it is that is making my hidden files appear and active (such that I am able to use aliases, such as
When I sign in initially with SSH and issue
ls -al, all I see is:
dr-x------ 2 username username 4096 Feb 10 01:10 . drwxr-xr-x 4 root root 4096 Feb 10 01:10 .. lrwxrwxrwx 1 username username 56 Feb 10 01:10 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop lrwxrwxrwx 1 username username 34 Feb 10 01:10 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs lrwxrwxrwx 1 username username 33 Feb 10 01:10 .Private -> /home/.ecryptfs/username/.Private lrwxrwxrwx 1 username username 52 Feb 10 01:10 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
(As an en passant: why are permissions set to
lrwxrwxrwx for most items here? Isn't that far too tolerant?)
Then, when I issue
ecryptfs-mount-private (as per the
README.txt) and issue another
ls -al, I keep seeing the same as above.
One time, I believed I was able to use aliases after I issued a
sudo command, but another time I was not able to. Then, another time I issued
cd /home/username (which is the same directory as
~ already, is it not?), and all of a sudden all other hidden files appeared and I was able to use aliases.
But now, after a few minutes in (but perhaps I've actually imagined this), even though I'm still able to see all the hidden files, I'm not able to use aliases anymore. This makes me believe this behavior is somehow coupled with
sudo, but I can't seem to figure out what exactly is going on here.
Can somebody enlighten me and explain what exact actions I need to undertake to see all hidden files in my home directory and enable aliases, and why this is (is it because of the encryption; is it coupled with
sudo; or perhaps something completely different)?
If possible, preferably, I'd like this to automatically be enabled when I login with SSH. Is that possible?
edit (clarification for Hauke Laging's comment):
When I log in with SSH and immediately issue
~, I get
-bash: ll: command not found. (Although now, it appears to work immediately after I logged out and logged in again, but perhaps this is because the other time it was the first time after boot up? I have no idea, really. It all appears to behave rather random.)
Then, one time, I believe I issued a
sudo ls -al, or some other inane command, after which
ll appeared to work.
ll didn't work, and only after I issued
ecryptfs-mount-private and did an explicit
cd /home/username, the hidden
.bashrc (etc.) files appeared with
ls -al, after which I was finally able to use an alias such as
But, you know what? I think I'll have to investigate this a bit more thoroughly, since my vague descriptions are probably getting us nowhere. I was hoping my problem would immediately ring a bell, but it appears I have to be a bit more precise about what actions I undertook.
What I am trying to accomplish though, is this:
When I log in through SSH (whether it be the first time after boot up, or any other time after that), I want all hidden files, in my home directory, to appear immediately when I issue
ls -al and that aliases, such as
ll, are immediately available as well.
My analysis of the problem, thus far, is that it appears that I first have to decrypt my home dir, before I am able to see the mentioned hidden files (apart from the ecryptfs-related symbolic links) and use aliases. Is that a correct assessment?