大网数据广告活动
服务器运维问答

File Permissions have Question Marks? How did this happen? How to scan for them?

· 52CE 我爱测

I have a bunch of files that are messing up my backup system (via rsync). The permissions are all question marks. How does this happen? How do I find them / scan for them? This partially breaks my backup system and I need to clea…

问题原文

原帖链接 · user708503 · CC BY-SA 4.0

I have a bunch of files that are messing up my backup system (via rsync). The permissions are all question marks. How does this happen? How do I find them / scan for them? This partially breaks my backup system and I need to clean them up before the backup system runs.

d????????? ? ? ? ? ? sub
d????????? ? ? ? ? ? sample4
d????????? ? ? ? ? ? sample3
d????????? ? ? ? ? ? sample2
d????????? ? ? ? ? ? sample1
-????????? ? ? ? ? ? queue.sh
-????????? ? ? ? ? ? notes

社区高分解答

原帖链接 · lsmooth · CC BY-SA 4.0

This happens if the user you are using to access a directory does not have execute permission on the directory iteself. To list the contents of a directory read permission is enough. But to cd into the directory or show the permissions of files etc. inside the execute permission is needed:

user@server ~ $ ls test/ -la
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
?????????? ? ? ? ?            ? testdir1
?????????? ? ? ? ?            ? testdir2
?????????? ? ? ? ?            ? testdir3
?????????? ? ? ? ?            ? testfile1
?????????? ? ? ? ?            ? testfile2
?????????? ? ? ? ?            ? testfile3
user@server ~ $ sudo chmod u+x test/
user@server ~ $ ls test/ -la
total 4
drwx------  5 user user   99 Mär 21 17:45 .
drwx------ 14 user user 4096 Mär 21 17:44 ..
drwx------  2 user user    6 Mär 21 17:45 testdir1
drwx------  2 user user    6 Mär 21 17:45 testdir2
drwx------  2 user user    6 Mär 21 17:45 testdir3
-rw-------  1 user user    0 Mär 21 17:45 testfile1
-rw-------  1 user user    0 Mär 21 17:45 testfile2
-rw-------  1 user user    0 Mär 21 17:45 testfile3

So you or your user which runs the backup probably does not have execute permission on some files etc.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-03-21)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。