First of all, as I’m new : thanks for all the works on SyncThing project.
It seems to be great.
I’m trying to setup a sync between one of my personal computers (Windows 10 x64) at home and my home NAS (a Synology DS213j).
It’s about photos/pictures. I want those to be backuped on my NAS, and accessible through my plex Media Server installed on my NAS. The folder of those photos/pictures should be accessible from “/volume1/photo/FirstName” on my NAS.
So, I setup a share in SyncThing on both side. For the PC, all seems to be OK. But, for the NAS, I setup the folder “/volume1/photo/FirstName” for the share I’ve created (same ID than the one I created on PC; link between NAS and PC OK).
And then I’ve got the following errors :
- 2018-01-05 22:53:28: Creating folder marker: mkdir /volume1/photo/FirstName/.stfolder: permission denied
- 2018-01-05 22:53:28: Error on folder “FIRSTNAME-PC/photos” (MyShare-ID): folder marker missing
And I seriously dunno how to fix it :/… any advice, please ?
Thanks for your help !
Search the forum for existing threads about permissions, or just read up on generic linux permissions and ownership. Syncthing is running as user A, directory is owned by user B, hence syncthing can’t create the files it needs.
Hello @AudriusButkevicius ,
Thanks for your answer.
I’ve already search the forum about it, but I can’t find anything relevant :/. I will search again.
I’ve tried to add the user “syncthing” to the group that owned the directory but it doesn’t change anything. I’m affraid of changing the user that owned the directory directly because I don’t want to mess anything else that is currently working (Plex, or any DSM process).
I will give a feedback after my search and tests.
Are you sure Syncthing is running as syncthing user? Try login as syncthing user and create file in folder
Hello @uok ,
Thanks for your answer.
You’re probably right : I’ve tried to create the folder “/volume1/photo/FirstName” with the user “syncthing” and it works well… but creating the share still not work : “permission denied”.
How can I check which user is running the process ?
After some searches in the forum, I’ve tried to add the user “syncthing” to the administrators group, but it doesn’t work anymore :/.
So I’m still stuck in it… help needed, please.
While syncthing is running, run
ps aux | grep syncthing and
ls -la /volume1/photo/FirstName for the (immediately) relevant permissions/ownerships and post the output here.
Hi @imsodin !
Yep, just did it :
syncthi+ 1568 0.0 0.1 4648 928 pts/1 S+ 16:44 0:00 grep --color=auto syncthing
syncthi+ 6501 0.0 0.6 800708 3380 ? Sl 00:25 0:02 /usr/local/syncthing/bin/syncthing -home=/usr/local/syncthing/var
syncthi+ 6674 24.4 16.8 803012 85664 ? Sl 00:25 239:28 /usr/local/syncthing/bin/syncthing -home=/usr/local/syncthing/var
So it seems to be the user syncthing running the process, right ?
And for the permissions/ownerships :
root@MYNAS:/volume1/photo# ls -la /volume1/photo/FirstName
d---------+ 2 syncthing users 4096 Jan 6 16:37 .
drwxr-xr-x+ 4 PhotoStation PhotoStation 4096 Jan 6 16:36 ..
root@MYNAS:/volume1# ls -la /volume1/photo
drwxr-xr-x+ 4 PhotoStation PhotoStation 4096 Jan 6 16:36 .
drwxr-xr-x 21 root root 4096 Jan 6 00:24 ..
drwxrwxrwx 5 http http 4096 Jan 6 00:24 @eaDir
d---------+ 2 syncthing users 4096 Jan 6 16:37 FirstName
Does it help ?
Your permissions are way off. Most directories have ACLs (that’s the
+), so Synology does some additional permission magic, but I guess it’s save to ignore that for now. Not even the owner is allowed to access the
chmod 775 /volume1/photo/FirstName will rectify that.
Ok, it works ! Thanks.
And I understand why… was blind to not see it xD.
Anyway, i hopoe thatnow it won’t be a problem to process some stuff in this directory using plex… will see.
Last question to fix all the mess I did with my test > can I delete, without worries, the directories “FIRSTNAME-PC” and “myshare-id” from this folder :
root@MYNAS:/usr/local/syncthing/var# ls -la
drwx------ 5 syncthing root 4096 Jan 6 17:02 .
drwxr-xr-x 5 syncthing root 4096 Jan 5 21:57 ..
-rw-rw-r-- 1 syncthing users 615 Jan 5 21:58 cert.pem
-rw------- 1 syncthing users 4470 Jan 6 17:02 config.xml
-rw------- 1 syncthing users 1710 Jan 5 21:58 config.xml.v18
-rw------- 1 syncthing users 2840 Jan 5 22:01 config.xml.v20
-rw------- 1 syncthing users 66 Jan 6 09:18 csrftokens.txt
drwxrwxr-x 3 syncthing users 4096 Jan 6 09:20 FIRSTNAME-PC
drwxrwxr-x 3 syncthing users 4096 Jan 5 22:52 myshare-id
-rw-rw-r-- 1 syncthing users 1070 Jan 5 21:59 https-cert.pem
-rw------- 1 syncthing users 1679 Jan 5 21:59 https-key.pem
drwxr-xr-x 2 syncthing users 4096 Jan 6 16:39 index-v0.14.0.db
-rw------- 1 syncthing users 288 Jan 5 21:58 key.pem
-rw-r--r-- 1 syncthing root 229 Nov 8 15:56 options.conf
Not sure I understand the question: If you don’t need their contents, sure you can delete it - the
ls -la output doesn’t really contain any relevant info.
I delete those without problem ^^.
All is OK now, thanks for your great help !
Sadly, this morning, I get back to my trouble.
Launching the web admin of syncthing, I found the error messages :
2018-01-14 10:31:22: Loading ignores: open /volume1/photo/Emilie/.stignore: permission denied
2018-01-14 10:31:22: Error on folder "EMILIE-PC/photos" (ghmg4-iavme): stat /volume1/photo/Emilie/.stfolder: permission denied
It seems that DSM kinda reset the permissions…
Dunno how to fix it :/.
The issue seems to come outside of syncthing so not sure we can help you much here.
Try running syncthing as the same user the ownership gets changed to
Hello @AudriusButkevicius !
How can I change the user that run syncthing according to you, please ?
Well I don’t know, it’s your machine with your operating system. All we do is provide an application to you, you have to work it out how to run it correctly on your OS.
OK, I’ll investigate about it and give a feed back when I found the solution.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.