1

Don't ask why but I did

rm .Private 

in my home directory. It deleted the soft link /home/user/.private not the /home/.ecryptfs/user.

I did

ln -s .Private /home/.ecryptfs/yoram/.Private/home/.ecryptfs/

but I get

l?????????? ? ? ? ? ? .Private

How do I recreate the original link?

  • Can you still login successfully? What happens? And were you logged into your (user `youram`) home when you deleted the `.Private` link? Maybe you deleted a file in the encrypted home? – Xen2050 Nov 30 '17 at 12:35
  • I can logon successfully. eveything works as far as I can see. So is it a real problem? –  Dec 25 '17 at 12:52

1 Answers1

0

Since everything still works & logs in OK, it looks like just ls doesn't have permission to execute the folder and is showing the annoying ???'s.

Giving the folder a chmod +x should fix it.

Here's some tests I did FYI:

$ mkdir test; touch test/1; touch test/2

$ ls -al test
total 0
drwxr-xr-x 2 user user  80 Dec 25 13:20 .
drwxrwxrwt 8 root root 300 Dec 25 13:20 ..
-rw-r--r-- 1 user user   0 Dec 25 13:20 1
-rw-r--r-- 1 user user   0 Dec 25 13:20 2

$ chmod -v -x test
mode of 'test' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)

$ ls -al test
ls: cannot access 'test/.': Permission denied
ls: cannot access 'test/..': Permission denied
ls: cannot access 'test/2': Permission denied
ls: cannot access 'test/1': Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? 1
-????????? ? ? ? ?            ? 2

$ chmod -v +x test
mode of 'test' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)

$ ls -al test
total 0
drwxr-xr-x 2 user user  80 Dec 25 13:20 .
drwxrwxrwt 8 root root 300 Dec 25 13:20 ..
-rw-r--r-- 1 user user   0 Dec 25 13:20 1
-rw-r--r-- 1 user user   0 Dec 25 13:20 2

$ chmod -v -r test
mode of 'test' changed from 0755 (rwxr-xr-x) to 0311 (-wx--x--x)

$ ls -al test
ls: cannot open directory 'test': Permission denied
Xen2050
  • 2,452
  • 1
  • 21
  • 17