Does any one successfully setup syncthing on AXT-1800?

That’s just the label I have given to the saves folder on the Batocera machine.
The folder path is the correct path.
I believe (probably wrongly) that once I have created this it will be introduced to the router and the router should create a similar folder in /mnt/mmcblk0.

Pretty sure it’s not only a label.
mkdir /xxxx would try to create it on the router on the root-level, where it does not have permissions.

1 Like

But looking at the Batocera files, I now realise I am definitely doing something wrong.
I thought I was creating a link to the userdata/share/saves/snes folder but clearly I am not, it’s just creating a folder in userdata called HX99G Syncthing.

I have now tried calling the folder Syncthing, no joy.
Tried working from the router to the Batocera machine, no joy.

Every attempt results in the same error message.

root@GL-AXT1800:/mnt/mmcblk0/syncthing# ls -l
-rw-r--r--    1 syncthin syncthin       794 Jan 27 14:49 cert.pem
-rw-------    1 syncthin syncthin      7901 Jan 27 15:27 config.xml
-rw-------    1 syncthin syncthin      7274 Jan 27 14:49 config.xml.v0
-rw-------    1 syncthin syncthin        33 Jan 27 14:51 csrftokens.txt
-rw-r--r--    1 syncthin syncthin       798 Jan 27 14:50 https-cert.pem
-rw-------    1 syncthin syncthin       288 Jan 27 14:50 https-key.pem
drwxr-xr-x    2 syncthin syncthin      4096 Jan 27 15:38 index-v0.14.0.db
-rw-------    1 syncthin syncthin       288 Jan 27 14:49 key.pem
root@GL-AXT1800:/mnt/mmcblk0/syncthing# cd syncthing
-ash: cd: can't cd to syncthing: No such file or directory
root@GL-AXT1800:/mnt/mmcblk0/syncthing# cd /mnt/mmcblk0/syncthing
root@GL-AXT1800:/mnt/mmcblk0/syncthing# ls -l
-rw-r--r--    1 syncthin syncthin       794 Jan 27 14:49 cert.pem
-rw-------    1 syncthin syncthin      7901 Jan 27 15:27 config.xml
-rw-------    1 syncthin syncthin      7274 Jan 27 14:49 config.xml.v0
-rw-------    1 syncthin syncthin        33 Jan 27 14:51 csrftokens.txt
-rw-r--r--    1 syncthin syncthin       798 Jan 27 14:50 https-cert.pem
-rw-------    1 syncthin syncthin       288 Jan 27 14:50 https-key.pem
drwxr-xr-x    2 syncthin syncthin      4096 Jan 27 15:38 index-v0.14.0.db
-rw-------    1 syncthin syncthin       288 Jan 27 14:49 key.pem
root@GL-AXT1800:/mnt/mmcblk0/syncthing# whoami
root

ls -l is reporting that Syncthing is the user.
whoami reports as root.
Is that because whoami is referring to the device as opposed to the /mnt/mmcblk0?

It appears that

/mnt/mmcblk0/syncthing

is owned(?) by Syncthing. But any folders created inside the syncthing directory/folder are still root root.

Is this correct?

Only if you create them. If syncthing creates them, they should be not root:root

1 Like

OK, so I have

device = root root
mnt/mmcblk0 = root root… I believe these are both correct?

I have

mnt/mmcblk0/syncthing = syncthing syncthing… which I also believe is correct?

So I need to figure out why, when Syncthing tries to create a new directory inside the existing syncthing directory, it gets denied permission.

As I said before, I am pretty sure that it does not create it there.
Failed to create folder root directory mkdir /HX99G Syncthing: permission denied

This totally tells us that it tries to create the dir inside / and not inside /mnt/mmcblk0/syncthing

OK.

So I have my Batocera machine and the GL-AXT1800 linked.

On which device do I select the folder I want to share?
Logic tells me that I should access the Batocera gui and select the “saves/snes” folder and share this with the router (and, as far as I can tell, the Batocera wiki says the same (but unfortunately, it is obvious that a lot of the Wiki is outdated) ).

But, if I do as I have explained above, I get the prompt to accept the share (in the router gui) but after a few seconds, it then tells me it can’t create the directory/folder.

1 Like

Sorry, can’t help you with this.

1 Like

You’re very close. Your nose is touching the finish line.

If you’re using option user 'syncthing' in the OpenWrt Syncthing conf (/etc/config/syncthing) on your ext4 formatted USB drive and the permissions (perms) for /mnt/mmcblk0/syncthing read syncthin syncthin using ls -l /mnt/mmcblk0/syncthing then you’re all set.

To be absolutely sure use chown -R syncthing:syncthing /mnt/mmcblk0/syncthing to ensure all files, folders within are converted in their permissions to the syncthing user.

Go into the Syncthing GUI, delete ay & all existing folders you may have ATM. Then go into Syncthing GUI → Actions → Settings & set the default path for all new folders to /mnt/mmcblk0/syncthing :

Restart Syncthing by rebooting the device or just try Synchting GUI → Actions → Restart.

Don’t create new files/folder via SSH/SFTP in the /mnt/mmcblk0/syncthing dir. Any that are are automatically owned by the root user. You are the root (admin in Windows parlance) user. It is expected by Syncthing that it should all be owned by the synthing user. Manage everything for sync points/folders by the Syncthing GUI which runs as the syncthing user.

Everything Syncthing handles for sync’d files, folders should be managed by the Syncthing GUI & that data would be housed/stored at /mnt/mmcblk0/syncthing .

Beyond that there’s nothing more I can do here.

This is the way.

See my previous comment ITT.

We have lift-off!

Thanks again for all the support.

4 Likes