Sync with syncthing to attached volume
-
I would like to use syncthing to synchronise to an attached block storage.
I have done this:- set up the block storage and connected it with Cloudron (I can access it via Volumes)
- added the volume with read-write permissions in the app settings
- verified that syncthing can access the volume in general (it has a rather un-intuitive UI for showing available folder paths)
However, syncthing says that this folder doesn't have write permissions, only read.
How do I have to set the permissions correctly in this case?
-
Hi @ekevu123
If memory serves, I ran into this in some instances earlier.
Depending on the way you mount your block, you might have to check the "ignore permission" flag on the folder properties, of the node/peer "owning" the folder (i.e. node where the folder is mounted):As far as I know, doing this had no incidence on the sync on any ends/peers, other than allowing this setup to operate. -
I hope that this helps. -
N nebulon marked this topic as a question on
-
N nebulon has marked this topic as solved on
-
Unfortunately, it didn't solve fully the problem. It allowed me to set up the block storage, but I still get "permission denied" while synchronising.
I have set up my folder locally to test, and then put the block storage as the receiving folder in the server. I tried touch /VOLUME/test.txt in the terminal inside syncthing to check permissions, this worked, so I have access rights to create files in the volume from the app.
UPDATE: I tried connecting both with equal read-write access to sync changes both ways. When I create a file on the volume not via syncthing, this gets synced to my computer. However, when I make a change on that file and want to sync this back, it produces the error.
So, there is something wrong with the writing rights, it seems, although it irritates me why I could still write a file via terminal from syncthing then. -
The syncthing user runs as "cloudron" user which is uid 1000 in docker base image. https://git.cloudron.io/cloudron/syncthing-app/-/blob/master/supervisor/syncthing.conf?ref_type=heads#L7 . Does the volume have permissions for uid 1000 ? You might have to adjust permissions via SSH for this.
-
@ekevu123 777 is fine.
user 1000 may not exist on the host (I think cloudon user has moved to uid 808 now to not conflict with iso installations). As long as there is other write/execute permissions for directories, it should work. You can also sticky bit and setfacl for new files to get correct permissions . See https://docs.cloudron.io/volumes/#sharing for ideas. It's all a bit technical/geeky but there is no way around this when using containers and external volumes.