bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.08k stars 229 forks source link

Unison running as service in rc.local fails to recognize file #955

Closed omitheaussie closed 12 months ago

omitheaussie commented 1 year ago

I am running Ubuntu 20.04 on a machine. There is a rc.local service that runs as follows:

#!/bin/bash sudo -u ubuntu s3fs nameofs3bucket /home/ubuntu/folder1 -0 umask=000 -o allow_others url=<url.com> sudo chown -R ubuntu:ubuntu /home/ubuntu/.unison /usr/bin/unison -root /home/ubuntu/folder1 -root /home/ubuntu/folder2 -batch -auto -prefer newer -repeat=watch

my permissions for the /usr/bin/ applications involved are rwxrwxrwx (the applications are unison, unison-fsmonitor, s3fs).

When I upload a file to s3 bucket the s3fs running in the background is able to mount the file to the folder1 without any problem with public permissions (rwxrwxrwx).

I uploaded 3 files to s3 bucket (temp1.txt, temp2.txt, temp3.txt) and I can see all their permissions when s3fs mounts them to folder1 are rwxrwxrwx (due to the umask=000 option). But in the log for unison I only see two of the 3 files and in the folder2 only 2 files get copied.

[BGN] Copying temp1.txt from /home/ubuntu/folder1 to /home/ubuntu/folder2 [END] Copying temp1.txt [BGN] Copying temp3.txt from /home/ubuntu/folder1 to /home/ubuntu/folder2 [END] Copying temp3.txt Unison 2.53.3 (ocaml 4.08.1) finished propagating changes at 16:17:21.22 on 25 Aug 2023, 85.803 s

I am not sure why unison is missing syncing the third file?

Also, if I dont set the option for the permissions for the synced files in folder1 look like -rw-------. In this case unison doesnt sync any files to folder2. I also tried running unison and s3fs both as root in rc.local, but that didnt work either.

gdt commented 1 year ago

Please ask for help on the mailinglist. While it's possible that there is a bug, you haven't established this. At this point I think you need guidance in debugging the situation, a fair bit of which can be found in the wiki page below. Specifically, enabling debugging and simplifying.

You should already have read the wiki on bug reporting. Can you explain if you already did, and if not how you entered a bug without the instructions to read it? It's at https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests

omitheaussie commented 1 year ago

Please ask for help on the mailinglist. While it's possible that there is a bug, you haven't established this. At this point I think you need guidance in debugging the situation, a fair bit of which can be found in the wiki page below. Specifically, enabling debugging and simplifying.

You should already have read the wiki on bug reporting. Can you explain if you already did, and if not how you entered a bug without the instructions to read it? It's at https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests

Hi Thanks for the links. I did look at the debug file by setting debug all. But as reported above, two of the three files synced fine but not the third. I will send the issue report to unison-users@seas.upenn.edu

EDIT: The email list doesnt work as I got auto-response that the group may not exist. EDIT2: I tried again, this time the same email worked!!. But my messages to the conversation keep getting deleted.

gdt commented 1 year ago

The link above has a link to list instructions at https://github.com/bcpierce00/unison/wiki/Mailing-Lists

gdt commented 12 months ago

feedback timeout (and not clearly a bug)