别问为什么,我问过
rm .Private
在我的主目录中。它删除了软链接(soft link)/home/user/.private 而不是/home/.ecryptfs/user。
我做到了
ln -s .Private /home/.ecryptfs/yoram/.Private/home/.ecryptfs/
但是我明白了
l?????????? ? ? ? ? ? .Private
如何重新创建原始链接?
最佳答案
由于一切仍然正常并且登录正常,看起来只是 ls
没有执行该文件夹的权限并且显示了烦人的 ???
.
给文件夹 chmod +x
应该可以修复它。
这是我做的一些测试,仅供引用:
$ 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
关于ubuntu - 在您的主目录中重新创建 .Private 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47411121/