[英]'[crit]' 398#398: *45 error - loading jpg from gphotofs mounted file system
Background: Busy with a project with the goal of serving jpg from a nikon d750 camera with nginx. 背景:忙于一个项目,目标是使用Nginx从nikon d750相机提供jpg。 Physical key -> GPIO RPI -> Callback -> websocket -> client -> show jpg from: gphotofs mounted file system. 物理密钥-> GPIO RPI->回调-> websocket->客户端->显示jpg来自:gphotofs挂载的文件系统。
Everything works fine as long as I don't try to load from the mounted file system, if I do I get the error: 只要我不尝试从已挂载的文件系统加载,一切都会正常,如果出现错误:
[crit] 398#398: *45 stat() nginx [暴击] 398#398:* 45 stat()nginx
The mounted directory is: /var/www/html/mount/ [store_00020001/DCIM/110D7100]
I can see all the files, so its properly mounted. 挂载的目录是: /var/www/html/mount/ [store_00020001/DCIM/110D7100]
我可以看到所有文件,因此可以正确挂载。
I tried: 我试过了:
chown -R 777 /var/www/html/mount
and: 和:
adduser www-data /var/www/html/mount
Anyone ideas on how to solve this? 任何人如何解决这个想法?
So this was an permissions based fault. 因此,这是基于权限的错误。
I ran gphotofs command from root, and tried to acces this directory via a symlink from www-data. 我从根目录运行了gphotofs命令,并尝试通过www-data的符号链接访问该目录。
I solved this as followed (with using APACHE instead of NGINX): 我按照以下方式解决了此问题(使用APACHE而不是NGINX):
changed envvar files as followed: 更改了envvar文件,如下所示:
sudo nano /etc/apache2/envvars 须藤纳米/ etc / apache2 / envvars
change: 更改:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
to: 至:
export APACHE_RUN_USER=pi
export APACHE_RUN_GROUP=pi
Created the symlink, and allowed apache to follow symlinks by editing conf file: 创建了符号链接,并允许apache通过编辑conf文件来遵循符号链接:
sudo nano /etc/apache2/sites-enabled/000-default.conf
and added the following lines BETWEEN virtualhost tags: 并在virtualhost标签之间添加了以下几行:
<Directory />
Options FollowSymLinks
AllowOverride Indexes
</Directory>
Done. 做完了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.