[英]Linux - Centos : Giving nginx chmod access
Alright so I cannot for the life of me get rid of this error : 好吧所以我不能为我的生活摆脱这个错误:
Warning!
ErrorException [ Warning ]: chmod(): Operation not permitted
COREPATH/classes/finder.php @ line 511:
510: {
511: chmod($dir.$file, \Config::get('file.chmod.files', 0666));
512: }
Here is my setup for permissions : 这是我的权限设置:
(775) : drwxrwxr-x myuser:nginx
Groups : 团体:
nginx:x:499:myuser,nginx
PHP-FPM Config PHP-FPM配置
user = nginx
group = nginx
So this works for creating / editing files ect. 所以这适用于创建/编辑文件等。 and that all works fine.
一切正常。
How can I get this to work correctly? 我怎样才能让它正常工作?
As root, try: 以root身份尝试:
chown nginx:nginx /your/directory/to/fuel/ -R
Also don't forget to run inside the FuelPHP directory: 另外不要忘记在FuelPHP目录中运行:
php oil r install
in order to make the necessary directories of FuelPHP writable 为了使FuelPHP的必要目录可写
这是因为nginx创建了一个文件,它必须是所有者。
PHP以www-user
(或类似)运行 - 检查您的权限。
What is you full path to file you are chmod'ing ? 你提出的完整文件是什么?
For example if its: /var/www/website/fuel/app/tmp/myfile.jpeg 例如,如果是:/var/www/website/fuel/app/tmp/myfile.jpeg
try checking the permissions for: 尝试检查以下权限:
ls -la /var/www/website/fuel/app/tmp/myfile.jpeg ls -la /var/www/website/fuel/app/tmp/myfile.jpeg
ls -la /var/www/website/fuel/app/tmp ls -la / var / www / website / fuel / app / tmp
ls -la /var/www/website/fuel/app ls -la / var / www / website / fuel / app
ls -la /var/www/website/fuel ls -la / var / www / website / fuel
ls -la /var/www/website ls -la / var / www / website
ls -la /var/www ls -la / var / www
And compare them 并比较它们
If think some of parent directories are just not 'writeable by others' 如果认为某些父目录不是“其他人可写的”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.