If I try to use upload from a read-only file system, the command fails with an exception.
pyftpsync upload --delete --resolve local /mnt/read-only-mount ftps://example.com/
Traceback (most recent call last):
File "xxx/venv/bin/pyftpsync", line 8, in <module>
sys.exit(run())
File "xxx/venv/lib/python3.8/site-packages/ftpsync/pyftpsync.py", line 242, in run
s.run()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 1106, in run
res = super(UploadSynchronizer, self).run()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 827, in run
res = super(BiDirSynchronizer, self).run()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 213, in run
res = self._sync_dir()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/synchronizers.py", line 571, in _sync_dir
self.local.flush_meta()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/targets.py", line 404, in flush_meta
self.cur_dir_meta.flush()
File "xxx/venv/lib/python3.8/site-packages/ftpsync/metadata.py", line 223, in flush
self.target.write_text(self.filename, s)
File "xxx/venv/lib/python3.8/site-packages/ftpsync/targets.py", line 318, in write_text
self.write_file(name, buf)
File "xxx/venv/lib/python3.8/site-packages/ftpsync/targets.py", line 463, in write_file
with open(os.path.join(self.cur_dir, name), "wb") as fp_dst:
OSError: [Errno 30] Read-only file system: '/mnt/read-only-mount/.pyftpsync-meta.json'
There have been similar requests (#19 and #34), so you may give an upvote there. But realistically, given the low resources I can currently invest, I might not address this in the near future (PRs welcome).
If I try to use
upload
from a read-only file system, the command fails with an exception.