john@ubuntu01:~$ sudo ls -l /var/opt/gitlab/git-data/repositories/GL/www.git
total 25068
drwxr-xr-x 2 git git 4096 aug 14 19:58 branches
-rw-r--r-- 1 git git 66 aug 14 19:58 config
drwxrwxrwx 2 root root 4096 aug 15 14:56 custom_hooks
-rw-r--r-- 1 git git 73 aug 14 19:58 description
-rw-r--r-- 1 git git 23 aug 14 19:58 HEAD
lrwxrwxrwx 1 git git 47 aug 14 19:58 hooks -> /opt/gitlab/embedded/service/gitlab-shell/hooks
drwxr-xr-x 2 git git 4096 aug 14 19:58 hooks.old.1471193907
-rw-r--r-- 1 git git 1329 aug 15 14:48 index
drwxr-xr-x 2 git git 4096 aug 15 13:58 info
drwxr-xr-x 71 git git 4096 aug 15 14:55 objects
-rw-r--r-- 1 git git 98 aug 15 13:58 packed-refs
-rw-r--r-- 1 git git 25618530 aug 15 14:03 post-receive.log
drwxr-xr-x 5 git git 4096 aug 14 20:31 refs
john@ubuntu01:~$ ls -l /var/opt/gitlab/git-data/repositories/GL/www.git
ls: cannot access '/var/opt/gitlab/git-data/repositories/GL/www.git': Permission denied
这是ACL
john@ubuntu01:~$ sudo lsattr /var/opt/gitlab/git-data/repositories/GL/www.git/custom_hooks
-------------e-- /var/opt/gitlab/git-data/repositories/GL/www.git/custom_hooks/post-receive
我以前从未见过。即使使用777也没有LS的许可?我需要共享此文件夹以进行更方便的开发。我该如何解决?谢谢。
编辑:(这是您的要求)
john@ubuntu01:~$ sudo ls -ld /var/opt/gitlab/git-data/repositories/GL/www.git
drwxrwxrwx 8 git git 4096 aug 15 14:48 /var/opt/gitlab/git-data/repositories/GL/www.git
john@ubuntu01:~$ sudo ls -ld /var/opt/gitlab/git-data/repositories/GL/www.git/custom_hooks
drwxrwxrwx 2 root root 4096 aug 15 14:56 /var/opt/gitlab/git-data/repositories/GL/www.git/custom_hooks
编辑更多
sudo ls -ld /var/opt/gitlab/git-data/repositories/GL/www.git
ls: cannot access '/var/opt/gitlab/git-data/repositories/GL/www.git': No such file or directory
嗯...这是什么?
是custom_hooks并具有drwxrwxrwx 2根根,请参见上文
—
user1797147 '16
ls: cannot access '/var/opt/gitlab/git-data/repositories/GL/www.git': Permission denied
因此,向我们展示当您ls -ld /var/opt/gitlab/git-data/repositories/GL/www.git
你能按照我的要求做吗?如果您没有对父目录的执行权限,则此目录上的777将无济于事
—
Zanna
显然,您的问题出在树上。继续检查权限,您会发现其中一个没有对x的许可,例如
—
Zanna
drwxr-x---
ls
未显示?