【发布时间】:2019-07-23 15:16:36
【问题描述】:
无法在 docker 容器中执行 bash :ubuntu
这是我的 bash 脚本(它的调用):
#!/bin/sh
php bin/magento cache:clean
php bin/magento cache:flush
它依次调用这个脚本:
> #!/usr/bin/env php <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */
>
> if (PHP_SAPI !== 'cli') {
> echo 'bin/magento must be run as a CLI application';
> exit(1); }
这是错误信息:
root@a72397092db6:/var/www/html# ./bins/clean
bash: ./bins/clean: Permission denied
root@a72397092db6:/var/www/html#
我希望脚本执行。我确实有权执行它。 这是目录的权限。
-rw-r--r-- 1 1000 root 68 Jul 23 14:07 clean
-rw-r--r-- 1 1000 root 234 Jul 23 14:07 compile
-rw-r--r-- 1 1000 root 6148 Jul 23 14:28 .DS_Store
-rw-r--r-- 1 1000 root 118 Jul 23 14:07 permissions
【问题讨论】:
-
这个问题有很多重复,例如stackoverflow.com/questions/18960689/… 只需谷歌搜索“bash 执行权限被拒绝”即可找到答案。
标签: linux bash docker operating-system