【问题标题】:Argument list too long - Apache参数列表太长 - Apache
【发布时间】:2015-04-04 22:31:23
【问题描述】:

我正在按照本教程在 AWS 实例 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html 中部署 wordpress 应用程序,但在执行时出现错误

[ec2-user@ip-10-10-1-73 ]$ find /var/www -type f -exec sudo chmod 0664 {} +
sudo: unable to execute /bin/chmod: Argument list too long
sudo: unable to execute /bin/chmod: Argument list too long

这个错误的根本问题是什么?

【问题讨论】:

    标签: mysql linux amazon-web-services permissions apache2


    【解决方案1】:

    所以你试图将许多参数传递给 chmod,你可能会用完堆栈空间。这是你可以在 linux 上使用 ulimit 设置的限制,但我个人只会修改命令

    find /var/www -type f -exec sudo chmod 0664 {} \;
    

    不同之处在于,使用 + 您尝试一次更改所有文件的权限,使用 \;您一次设置一个文件的权限

    【讨论】:

      猜你喜欢
      • 2019-06-03
      • 2017-11-30
      • 2020-05-09
      • 2014-05-21
      • 2021-10-26
      • 2014-04-18
      • 2021-10-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多