V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
bestehen
V2EX  ›  问与答

请问一下喝过权限如何处理呢?

  •  
  •   bestehen · 2018-08-28 00:03:20 +08:00 · 1051 次点击
    这是一个创建于 2066 天前的主题,其中的信息可能已经有所发展或是发生改变。
    打印文件夹目录
    ['/home/shenjianlin/test_pdf/2018 年 6 月“互联网+”发展情况舆情监测-20 页 (1).pdf']
    /home/shenjianlin/test_pdf/2018 年 6 月“互联网+”发展情况舆情监测-20 页 (1).pdf
    Traceback (most recent call last):
    File "upload_pdf.py", line 106, in <module>
    up_load_pdf().post_file(url, csrf_token, file)
    File "upload_pdf.py", line 57, in post_file
    files = {'ReportForm[url]': (path.name, open(file_path, 'rb'), mimetypes.types_map[path.suffix])}
    PermissionError: [Errno 13] Permission denied: '/home/shenjianlin/test_pdf/2018 年 6 月“互联网+”发展情况舆情监测-20 页 (1).pdf'

    因为这个权限不好处理,求人指教,谢谢 不允许手动修改文件夹权限,只能通过程序处理
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3197 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:35 · PVG 21:35 · LAX 06:35 · JFK 09:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.