Seaf-cli does sticks at "waiting for sync"


#1

Hi everybody,

I am using the newest seaf-cli client (6.2.9) to sync some libraries to a mounted external storage but I have a very strange problem.

My setup is:

  • seafile server 6.3.4 running on a ubuntu server 16.04
  • seafile storage is the local disk
  • on /mnt/hidrive I have mounted some hidrive storage via webdav

Now I try to sync some libraries from the seafile server to the /mnt/hidrive folder. This is running smooth as long as the the seaf-cli user has read+write access to this libraries. That means I can add files on the seafile-server, I can add or change files on the hidrive. Everything is in sync thanks to the seaf-cli client.

But If I want to sync a library that is only shared to this user with read-only permission, the sync process is stuck as soon as I delete a file on the hidrive.

The log says the following:

[06/04/19 14:45:32] sync-mgr.c(559): Repo 'Bibliothek-A' sync state transition from 'synchronized' to 'uploading'.
[06/04/19 14:45:32] http-tx-mgr.c(1181): Transfer repo '9d950701': ('normal', 'init') --> ('normal', 'check')
[06/04/19 14:45:32] http-tx-mgr.c(2438): Bad response code for GET https://seafile-demo.de/seafhttp/repo/9d950701-5c67-4e7a-8d54-94fc7c802542/permission-check/?op=upload&client_id=9ca3b20e583b0869ff2ed854d4dbeac81f90b1c1&client_name=unknown: 403.
[06/04/19 14:45:32] http-tx-mgr.c(3708): Upload permission denied for repo 9d950701 on server https://seafile-demo.de.
[06/04/19 14:45:32] http-tx-mgr.c(1181): Transfer repo '9d950701': ('normal', 'check') --> ('error', 'finished')

For me it looks like the following:

  • the seaf-cli downloads all information from the library “Bibliothek-A”. Imagine there is only one file “test.txt” in the library
  • after a while the sync is done and the seaf-cli status shows the status synchronized
  • Now I delete the file test.txt on the hidrive (change is also possible)
  • the seaf-cli client detects the change on the hidrive and wants to “upload” this new information to the seafile-server
  • the seaf-cli requests his “permission” for this library and gets a 403 code
  • the seaf-cli does not know what to do and just stops the sync

In my opinion this behaviour is wrong. If the seaf-cli client tries to upload a “read-only” library the seaf-cli client should receive the answer of the server “you are not update this library, therefore no sync allowed”.
AND of cause the sync has to go on. If I add a new file on the seafile-server it should be synchronized to hidrive via the cli-client.

So my questions are

Best regards
Christoph


#2

This is a bug in seaf-cli. Currently seaf-cli doesn’t handle syncing read-only libraries correctly.


#3

ok. thanks for the confirmation.
Do you have an idea when this will be tackelt or fixed?