许可 d--------- 是什么意思

alt*_*set 3 gnome-terminal chmod

我只是运行,chmod 765 -r ./希望最后一部分(./)能让我在当前工作目录上运行命令。当前的工作目录是我的 Laravel 项目。现在我无法访问它,当我跑步时,ls -l我看到d---------它前面。

这是否意味着我无法控制它?包括运行另一个chmod 777命令,因为当我尝试这样做时,我的权限被拒绝。

cma*_*.fr 5

$ chmod 0000 Foo
$ ls -l
d---------  2 myuser mygroup 4.0K Aug 29 20:33 Foo
Run Code Online (Sandbox Code Playgroud)

d--------- 表示具有 0000 权限的目录

以下是我如何在“/home/$USER”目录中“修复”权限:

# recursively Restore ownership of directory
sudo chown -R $USER:$USER /home/$USER/Path/To/Dir/

# Set perms on directories
find ~/Path/To/Dir/ -type d  -exec chmod 0750 {} \;

# Set perms on files
find ~/Path/To/Dir/ -type f  -exec chmod 0640 {} \;

# Set perms on sh script files
find ~/Path/To/Dir/ -type f -iname '*.sh' -exec chmod 0750 {} \;
Run Code Online (Sandbox Code Playgroud)