php - file_put_contents permission denied
漂亮男人
漂亮男人 2017-05-16 13:16:26
0
1
505

The environment of the subject is vmware+ubuntu+laravel+nginx+mysql

Set the address of the vm’s shared folder under ubuntu/mnt/hgfs/htdocs/data_web

The permissions of htdocs are as follows
##The permissions of laravel project are as follows

The permissions of nginx are as follows

The file_put_contents function is used in the code. The specific error is as follows

file_put_contents(/mnt/hgfs/htdocs/data_web/storage/ad_110309.html): failed to open stream: Permission denied

I tried a few ideas

php artisan cache:clear

chmod -R 777 storage

composer dump-autoload

But it’s useless. I wonder if the user www needs to be added to the vm’s shared folder user permissions, similar to the solution to this problem of /a/11..., but I don’t know how to add it?

漂亮男人
漂亮男人

reply all(1)
PHPzhong

This directory is mounted locally. Check the permissions of local files.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!