【问题标题】:Python Permission error when running EC2 EFS mount helper运行 EC2 EFS 挂载帮助程序时出现 Python 权限错误
【发布时间】:2018-11-09 09:23:10
【问题描述】:

我试图在 Debian 9 EC2 实例上运行挂载助手

https://docs.aws.amazon.com/efs/latest/ug/mounting-fs.html#mounting-fs-mount-helper-ec2

运行以下(使用我自己的正确文件路径和 EFS ID)

$ sudo mount -t efs fs-12345678:/ /mnt/efs

我收到以下错误:

    Traceback (most recent call last):
  File "/sbin/mount.efs", line 674, in <module>
    main()
  File "/sbin/mount.efs", line 668, in main
    mount_tls(config, init_system, dns_name, path, fs_id, mountpoint, options)
  File "/sbin/mount.efs", line 630, in mount_tls
    with bootstrap_tls(config, init_system, dns_name, fs_id, mountpoint, options) as tunnel_proc:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/sbin/mount.efs", line 391, in bootstrap_tls
    start_watchdog(init_system)
  File "/sbin/mount.efs", line 367, in start_watchdog
    proc = subprocess.Popen(['/sbin/status', WATCHDOG_SERVICE], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

从环顾 Google 看来,我似乎需要以某种方式以管理员权限运行 Python?我试过设置

/sbin/状态

到 chmod 777

【问题讨论】:

    标签: python amazon-web-services amazon-ec2 debian amazon-efs


    【解决方案1】:

    解决办法 - 挂载 EFS 代码不支持 sysvinit.. 切换到 systemd

    https://major.io/2014/05/20/switching-to-systemd-on-debian-jessie/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-25
      • 2018-07-22
      • 2020-09-07
      • 2021-01-24
      • 2021-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多