简体   繁体   English

'[crit]'398#398:* 45错误-从gphotofs安装的文件系统加载jpg

[英]'[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):

  1. 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.

相关问题 从主机文件结构挂载了/ var / www /的虚拟机上的nginx上的“找不到文件”错误 - File not found error from nginx on a virtual machine where /var/www/ is mounted from host file structure Nginx抛出错误的新SubDomain配置:[crit] 29036#0 - New SubDomain Config for Nginx Throwing an Error: [crit] 29036#0 NGINX:如何从 img/file.jpg 重定向到 public/img/file.jpg - NGINX: How to redirect from img/file.jpg to public/img/file.jpg docker 中挂载卷的文件权限 - File permissions for mounted volumes in docker 为什么我从 Nginx 收到只读文件系统错误? - why I am getting Read only file system error from Nginx? kubernetes - Nginx,证书管理器,安装的秘密文件更新问题 - kubernetes - Nginx, cert-manager, mounted secret file renewal issue 使用volume-from装入的卷为空 - Mounted volume using volume-from is empty 加载csv文件时出错:内存中的巨大文本节点 - Error loading csv file: Huge text node out of memory Docker撰写错误为Tomcat集群加载conf / server.xml文件 - Docker compose error loading conf/server.xml file for Tomcat cluster 加载jpg时获取404未能加载资源:服务器响应状态为404() - fetch 404 while loading jpg Failed to load resource: the server responded with a status of 404 ()
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM