maestral
maestral copied to clipboard
InsufficientPermissionsError after extracting zip file
After extracting a zip file, maestral shows dialog box "Could not sync file or folder. Insufficient read or write permissions for this location." and then pause indefinitely.
Another bug: Show sync issues displays no error (it should display the previous error).
Last part of log follows. Full log sent via e-mail.
GUI = daemon = 1.4.3
2021-04-16 17:08:15 maestral.sync ERROR: Could not sync file or folder
Traceback (most recent call last):
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/client.py", line 151, in convert_api_errors
yield
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 843, in get_local_hash
hash_str, mtime = content_hash(local_path)
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/utils/path.py", line 367, in content_hash
with open(local_path, "rb") as f:
PermissionError: [Errno 13] Permission denied: '[DROPBOX FOLDER]/[REDACTED]'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 3603, in handle_sync_thread_errors
yield
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 3736, in upload_worker
sync.upload_sync_cycle()
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 1706, in upload_sync_cycle
changes, cursor = self.list_local_changes()
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 1741, in list_local_changes
sync_events = [SyncEvent.from_file_system_event(e, self) for e in events]
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 1741, in <listcomp>
sync_events = [SyncEvent.from_file_system_event(e, self) for e in events]
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/database.py", line 402, in from_file_system_event
content_hash=sync_engine.get_local_hash(to_path),
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/sync.py", line 843, in get_local_hash
hash_str, mtime = content_hash(local_path)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/home/raffaele/.local/lib/python3.8/site-packages/maestral/client.py", line 168, in convert_api_errors
raise os_to_maestral_error(exc, dbx_path, local_path)
maestral.errors.InsufficientPermissionsError: Could not sync file or folder. Insufficient read or write permissions for this location.
2021-04-16 17:08:54 maestral.sync DEBUG: Detected remote changes: False
Yup, that's a bug. It should not crash the sync threads but just flag a sync issue. Looking into the code, this has already been fixed in the development branch (commit 31281fb18e72744311425383cce4114ed7b476f3) and will land in the next release.