#Permission Issue with Syncthing in CasaOS

39 messages · Page 1 of 1 (latest)

lament sage
#

Hello friends,

I'm currently trying to setup Syncthing for my server.
So far, everything has worked perfectly aside from creating a folder for a share I did from my phone. Basically, the system doesn't allow Syncthing to create anything outside its config folder.

I tried creating a folder called Sync in the root of CasaOS for Syncthing to use when receiving shares. The only problem is that every time it tries using/creating that folder itself, it doesn't work.

This is what I get:
2023-10-31 17:39:11: Failed to create folder root directory mkdir /run/s6-rc:s6-rc-init:NJomPl/servicedirs/svc-syncthing/Sync: permission denied

2023-10-31 17:39:11: Error on folder "Redacted" (Redacted): folder path missing

Things I've already tried:

  • Adding the folder through the volumes option for the Syncthing container (/Sync and /Sync)
  • Creating the folder itself through the CasaOS file browser (no effect)
  • Sharing the folder with Windows so I can change its permissions (no effects, normally works for other containers)
  • chmod 700 on the path

Please, help this poor soul!

Server info:
CasaOS running on Ubuntu under Proxmox (Proxmox>Ubuntu>CasaOS)
HDD as main storage for Ubuntu/CasaOS
Proxmox installed in NVME SSD

lament sage
#

Actually, is there any way to give full file system access to Syncthing? I need it to be able to see everything.

earnest vapor
#

I've got the same problem. Did you solve it?

lament sage
# earnest vapor I've got the same problem. Did you solve it?

hey, never solved the issue. What I did was just sync everything into Syncthing's own directory. But that's still limiting. I decided to use Duplicati for backups, more stable on that regard. Syncthing is great when it has permissions. But even in it's own directory it still has some permissions issues too.

earnest vapor
#

Ah that's a bummer 😕

#

I wanted to sync files from different machines to personal folders for different users on my server

lament sage
#

It's just on Linux and CasaOS

#

I use CasaOS as a relay for syncing, while my windows machine also has copies on different folders

earnest vapor
#

Yeah I get your setup, I just wanted to store more organised in casa too

#

You know everyone having their one space etc and that can't happen if I'm limited to the internal 32gb or so storage

lament sage
#

are u using casaos as the main system or are u using something like proxmox?

earnest vapor
#

On the main, I've changed nothing from the defaults of my zimaboard

next thistle
thorn meadow
#

I had a few permission errors with Syncthing. You don't have the problem that's solved by creating a hidden folder (that Syncthing is failing to create in error) in your data folder called .stfolder (the . Being the hidden bit). I manually created .stfolder in each the root of each data directory structure and it ran ok after that. Strange error but it solved it for me. Have a Google on .stfolder Syncthing there's one or two discussions.

earnest vapor
earnest vapor
fossil parrot
#

for my case I'm using an external hardrive and want to save all my synced data there

#

my solution is to change the location of syncthing to the external hardrive itself

#

not a good solution by any means but it's what I'm stuck at

severe egretBOT
#

GG @fossil parrot, you just advanced to level 1!

next thistle
#

not “PCAP Values”

night canyon
ornate crow
#

This happens because docker is running as non privileged user (casaos), and it's trying to write to /run/, which is basically not for users to write (I'm simplifying a lot the real reason). Change your volume to point to somewhere else (a directory under /home or /mnt, for example), and restart syncthing

#

These .stdfolder and environment variables tricks will never fix your problem if docker doesn't have write permissions, to start with.

wet sand
#

having this same issue, it is pointed to a mnt directory

#

025-01-08 19:20:33: Failed to create folder root directory: mkdir /mnt/ExtraNAS: permission denied

2025-01-08 19:20:33: Error on folder "TV Shows" (g9bcg-dxctm): folder path missing

wet sand
#

@ornate crow if you could help when you get the chance that would be great!

ornate crow
#

hey @wet sand quite late, but I do not look frequently to discord

#

if this message 025-01-08 19:20:33: Failed to create folder root directory: mkdir /mnt/ExtraNAS: permission denied is in your host, you need to create it and maybe mount it (as it is under /mnt)

#

and give it the right permissions to the user which is running docker (with sudo chown and sudo chgrp, just google for it)

#

if you have PUID and PGID set in your container

#

otherwise, it will be running as root so you shouldn't have such problem

#

that's the overall idea

severe egretBOT
#

GG @ornate crow, you just advanced to level 12!

ornate crow
#

now I will be logging off (I may not answer in a while)