简体   繁体   English

无法访问在AWS EC2实例上运行的Flask应用程序usnig wsgi中的文件

[英]Unable to access file in flask app usnig wsgi running on AWS EC2 instance

在AWS wsgi上运行的Flask应用无法打开文件。

 [wsgi:error] IOError: [Errno 13] Permission denied: 'input.txt', referer:<ip-address>

Do not use a relative file pathname in your code. 不要在代码中使用相对文件路径名。 Work it out as an absolute path. 算出绝对路径。 The current working directory of the process will not be where your code is. 该进程的当前工作目录将不在您的代码所在的位置。 See more details of why in: 在以下位置查看更多原因的详细信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM