【发布时间】:2015-03-02 10:31:10
【问题描述】:
我在让 PHPStorm 与 laravel/composer 一起工作时遇到了一些麻烦。
打开 PHPStorm 后,我创建了一个新的 Composer 项目:http://puu.sh/e4y1H/6fb97cf976.png
然后,我填写了必要的详细信息:http://puu.sh/e4y6Z/55bc60e7fc.png
继续后,我遇到以下错误:
php /Users/mdobrenko/Sites/test/composer.phar create-project laravel/laravel
/Users/mdobrenko/Sites/test/composer -n --no-progress
Installing laravel/laravel (v4.2.11)
- Installing laravel/laravel (v4.2.11)
Loading from cache
Created project in /Users/mdobrenko/Sites/test/composer
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.5.8)
Loading from cache
- Installing symfony/security-core (v2.5.8)
Loading from cache
- Installing symfony/routing (v2.5.8)
Loading from cache
- Installing symfony/process (v2.5.8)
Loading from cache
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/debug (v2.5.8)
Downloading: connection... Downloading: 0% Downloading: 10% Downloading: 35% Downloading: 45% Downloading: 70% Downloading: 80% Downloading: 90% Downloading: 100%
- Installing symfony/http-foundation (v2.5.8)
[ErrorException]
touch(): Utime failed: Permission denied
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [package] [directory] [version]
我存储我的开发项目的“站点”目录(该项目所在的位置)具有以下权限集:
drwxrwxrwx 11 mdobrenko staff 374 Jan 4 13:40 Sites
我注意到我的大多数 php artisan 命令都需要使用“sudo”。通过命令新建一个 laravel 项目:
composer create-project laravel/laravel your-project-name --prefer-dist
我感觉权限可能是问题所在,但我不确定如何解决此问题。任何帮助将不胜感激!
【问题讨论】:
-
这个link 应该会有所帮助。尝试清除作曲家缓存,重新安装作曲家,将站点文件夹与 apache 服务器使用的用户相同
-
这对我有用;我只需要将sites/laravel 文件夹分配给正确的用户。谢谢!
-
太好了,我会把它添加为答案,这样我们就可以关闭问题了。
标签: laravel composer-php phpstorm user-permissions