yadayada / acd_cli

An unmaintained command line interface and FUSE filesystem for Amazon (Cloud) Drive
Other
1.35k stars 165 forks source link

Can't mount as normal user #535

Closed emreuenal closed 7 years ago

emreuenal commented 7 years ago
python3 -c 'import platform as p; print("%s\n%s" % (p.python_version(), p.platform()))'
3.4.5
Linux-3.10.0-514.6.1.el7.x86_64-x86_64-with-centos-7.3.1611-Core

After some system updates and restart, i cant mount as normal user:

[emre@emreunal acd]$ acd_cli mount /hdd2/acd/acd_all/
Traceback (most recent call last):
  File "/usr/bin/acd_cli", line 9, in <module>
    load_entry_point('acdcli==0.3.2', 'console_scripts', 'acd_cli')()
  File "/usr/bin/acd_cli.py", line 1680, in main
    ret = args.func(args)
  File "/usr/bin/acd_cli.py", line 1144, in mount_action
    asp = partial(autosync, args.interval, stop=Event())
  File "/usr/lib64/python3.4/multiprocessing/context.py", line 91, in Event
    return Event(ctx=self.get_context())
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 336, in __init__
    self._cond = ctx.Condition(ctx.Lock())
  File "/usr/lib64/python3.4/multiprocessing/context.py", line 66, in Lock
    return Lock(ctx=self.get_context())
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 163, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 60, in __init__
    unlink_now)
PermissionError: [Errno 13] Permission denied

Debug:

[emre@emreunal acd]$ acd_cli -d mount /hdd2/acd/acd_all/
17-02-22 13:13:54.608 [INFO] [acd_cli] - Plugin leaf classes: TestPlugin
17-02-22 13:13:54.608 [INFO] [acd_cli] - TestPlugin attached.
17-02-22 13:13:54.608 [INFO] [acd_cli] - Settings path is "/home/emre/.config/acd_cli".
17-02-22 13:13:54.608 [INFO] [acd_cli] - Cache path is "/home/emre/.cache/acd_cli".
17-02-22 13:13:54.608 [DEBUG] [acdcli.utils.conf] - configuration resulting from merging default and acd_cli.ini: {'download': {'keep_corrupt': 'False', 'keep_incomplete': 'True'}, 'DEFAULT': {}, 'upload': {'timeout_wait': '10'}}
17-02-22 13:13:54.609 [DEBUG] [acdcli.utils.conf] - configuration resulting from merging default and acd_client.ini: {'proxies': {}, 'DEFAULT': {}, 'transfer': {'connection_timeout': '30', 'chunk_retries': '1', 'fs_chunk_size': '131072', 'idle_timeout': '60', 'dl_chunk_size': '524288000'}, 'endpoints': {'filename': 'endpoint_data', 'validity_duration': '259200'}}
17-02-22 13:13:54.609 [INFO] [acdcli.api.client] - Initializing ACD with path "/home/emre/.cache/acd_cli".
17-02-22 13:13:54.609 [INFO] [acdcli.api.oauth] - AppspotOAuthHandler initialized
17-02-22 13:13:54.610 [DEBUG] [acdcli.utils.conf] - configuration resulting from merging default and cache.ini: {'sqlite': {'filename': 'nodes.db', 'busy_timeout': '30000', 'journal_mode': 'wal'}, 'blacklist': {'folders': '[]'}, 'DEFAULT': {}}
17-02-22 13:13:54.636 [INFO] [acdcli.cache.schema] - DB schema version is 2.
17-02-22 13:13:54.636 [DEBUG] [acdcli.cache.db] - Set busy_timeout to 30000. Result: 30000.
17-02-22 13:13:54.636 [DEBUG] [acdcli.cache.db] - Set journal_mode to wal. Result: wal.
17-02-22 13:13:54.637 [INFO] [acd_cli] - Last sync at 2017-02-22 11:21:20.389950.
17-02-22 13:13:54.637 [DEBUG] [acd_cli] - Namespace(acd_client=<acdcli.api.client.ACDClient object at 0x7f16176f0da0>, action='mount', allow_other=False, allow_root=False, cache=<acdcli.cache.db.NodeCache object at 0x7f16176e8208>, check=0, color=2, debug=1, foreground=False, func=<function mount_action at 0x7f1617945950>, gid=1003, interval=0, log=True, modules='', nlinks=False, no_wait=False, nonempty=False, path='/hdd2/acd/acd_all/', read_only=False, single_threaded=False, uid=10000, umask=18, utf=False, verbose=None, volname=None)
Traceback (most recent call last):
  File "/usr/bin/acd_cli", line 9, in <module>
    load_entry_point('acdcli==0.3.2', 'console_scripts', 'acd_cli')()
  File "/usr/bin/acd_cli.py", line 1680, in main
    ret = args.func(args)
  File "/usr/bin/acd_cli.py", line 1144, in mount_action
    asp = partial(autosync, args.interval, stop=Event())
  File "/usr/lib64/python3.4/multiprocessing/context.py", line 91, in Event
    return Event(ctx=self.get_context())
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 336, in __init__
    self._cond = ctx.Condition(ctx.Lock())
  File "/usr/lib64/python3.4/multiprocessing/context.py", line 66, in Lock
    return Lock(ctx=self.get_context())
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 163, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/usr/lib64/python3.4/multiprocessing/synchronize.py", line 60, in __init__
    unlink_now)
PermissionError: [Errno 13] Permission denied

i have the same issue in virtualenv too.

thanks in advance

emreuenal commented 7 years ago

Solution:

sudo chmod 777 /dev/shm/

For POSIX semaphores to work, the users need r/w access to shared memory (/dev/shm).