gpt4 book ai didi

amazon-web-services - ls : cannot open directory '.' : Permission denied

转载 作者:行者123 更新时间:2023-12-03 18:15:39 25 4
gpt4 key购买 nike

我的应用程序在 ec2 上运行实例。

我可以成功ssh进入我的应用程序,但当我 cd进入正确的文件夹并运行ls我收到以下错误:
ls: cannot open directory '.': Permission denied
似乎它与我的用户权限有关,因为运行应用程序也会引发 403 Forbidden错误。

我的应用程序文件夹的权限如下:
d-wx-wx--x 17 ubuntu ubuntu 4096 Apr 20 10:53 application-name
我是否需要将其更改为其他内容才能使其正常工作?如何?

最佳答案

如果您没有足够的权限来读取该目录,则此错误是有意义的。尝试更改当前用户的权限或将访问模式更改为全局,即 777
例如:

sudo bash
chmod 775 .

关于amazon-web-services - ls : cannot open directory '.' : Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49944942/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com