Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从vagrant运行wordpress时权限被拒绝_Wordpress_Mamp_Vagrant - Fatal编程技术网

从vagrant运行wordpress时权限被拒绝

从vagrant运行wordpress时权限被拒绝,wordpress,mamp,vagrant,Wordpress,Mamp,Vagrant,我正在从MAMP迁移到Vagrant,我已经在现有的MAMP documentRoot下安装了wordpress,我已经将我的MAMP docroot映射到我的Vagrant docroot,一切正常,但当我尝试从浏览器打开wordpress安装时,我得到: Warning: fopen(/var/www/wordpress/wp-content/temp-write-test-1394060868): failed to open stream: Permission denied in /v

我正在从MAMP迁移到Vagrant,我已经在现有的MAMP documentRoot下安装了wordpress,我已经将我的MAMP docroot映射到我的Vagrant docroot,一切正常,但当我尝试从浏览器打开wordpress安装时,我得到:

Warning: fopen(/var/www/wordpress/wp-content/temp-write-test-1394060868): failed to open
stream: Permission denied in /var/www/wordpress/wp-admin/includes/file.php on line 905
也尝试过(从流浪汉)到
chown-R www-data:www-data*
但没有成功,主人仍然是“流浪汉”


谢谢

修复!这是足够的设置

config.vm.synced_folder ".", "/var/www", :owner=> 'www-data', :group=>'www-data'

在vagrant文件中,然后
vagrant-halt
vagrant-up
重新启动机器。

修复!这是足够的设置

config.vm.synced_folder ".", "/var/www", :owner=> 'www-data', :group=>'www-data'

在vagrant文件中,然后
vagrant-halt
vagrant-up
重新启动机器。

完全是救命恩人;)