Note that the media server only works in the systemfolders “photo”, “music”, “video”. So the first question is where Syncthing stores the files on Synology. Then I assume that the rights for Syncthing are set for all the sync folders.
Furthermore, it should be irrelevant who created the files, whether from the WinSCP user or from the user syncthing.net or the group syncthing, either one or the other is in the directory, that should have no influence.
It would be good if we had more details and maybe a few screenshots.
Media server is able to share other folders as well when added at Media Indexing an this is done so I “see” video files in the folder I have added as this which contain video, and I “see” music files in the folder I have added as this one which contain music and so on for pictures as well:
so this is not the issue.
Then I have that folder with music (which is already specified in Indexing) with the content synced from PC (The best-various artists) and folder created manually via WinSCP:
yes, source (Send only) and destination folder (Receive only) are having “ignore permissions” flag set.
But I think this is irrelevant as this setting is valid only for FAT files system:
“File permission bits are ignored when looking for changes. Use on FAT file systems.”
Additional information: on my PC I can browse what is shared on Synology and the same - I can see only those folders that are not created by sync process:
Synology not using a FAT file system is irrelevant here, you have to enable the “ignore permissions” option anyway.
When Syncthing tries to set the permission bits, it only handles the POSIX compatible stuff. That does work, but clears the ACL based rules that Synology usually applies (which is actually the right thing to do). So you have to tell Syncthing to not try that and all files will then inherit their ACL from the parent folders.
The synchronization itself apparently worked, so the files should be on the DS. The first question is how long the indexing takes, regardless of who the files are upload, because the files can only be seen after indexing have been completed.
Then we should do a test. Apparently you uploaded the files via WinSCP as an administrator. Can you maybe use a “normal user” for this? Because Syncthing as a user or group is not a member of the administrator group. This enables us to see if this works via a normal user or not. Further, did you log in with WinSCP via SCP or FTP? With SCP you are usually logged in as admin or root, with FTP it would be different.
When you added the user syncthing.net or the group syncthing to the directory, did you also inherit these rights manually in the subfolders? Sometimes it is better to do this manually.
I have a Microsoft background and know what are NTFS and shares ACLs but how it works on Linux based OS is kind of unknown area.
So could you please specify what permissions should I set on /music/ folder in order to achieve what you are writing: “So you have to tell Syncthing to not try that and all files will then inherit their ACL from the parent folders”
?
As mentioned I tried with some permissions settings revoking “Take ownership” “Change permissions”:
and also revoking “Write attributes” and “Write extended attributes”:
but still folders synced from PC to Synology are getting syncthing.net as the owner and are not visible on TV.
I meant you must set the “Ignore permissions” option within all Syncthing folders’ configuration on the NAS side. @calmh This should probably be default for the SPK package?
To recover from the “wrong” permissions caused by having it disabled, you essentially have to reset all permissions from the DSM GUI to whatever is needed IIRC. It’s been some time since I handled such problems, so not quite sure but I remember that the Synology help was rather good to explain the two overlaid permission systems (POSIX and ACL) and what is needed to make it work as expected.
General advice on DSM: never touch the POSIX permissions, use what they intended. For your understanding as a Windows user: POSIX is basically like the good old read-only flag on a file, although much more powerful. ACLs are comparable to the Windows world, but overrule the simpler POSIX system. Synology has their own tool and system to manage ACLs.
As I have informed already at the beginning: “ignore permissions” option is enabled on both sides: PC and Synology and that doesn’t do any difference.
I have just abandoned the idea to sync music files from PC to Synology as the files synced and shared by Media Server installed on Synology are not visible on TV.
I’m gonna copy music files from PC to Synology using WinSCP.
You will find the “syncthing” group in the DSM, which can also be edited. In addition to the rights for folders, there are also rights for applications. Perhaps you are trying to tick the relevant applications as if this group wanted to use them.
and I have granted syncthing.net account Read permission on /volume1/MyNAS/ “only this folder” and /volume1/MyNAS/6_Music/ Read & Write permissions.
It was correct configuration because sync from PC to /volume1/MyNAS/6_Music/ was in place.
Playing with permissions, testing settings on another temporary folders structure I came up to the conclusion that music files became visible once I changed permissions on top folder /volume1/MyNAS/ from “only this folder” to “All” (which means: this folder, child folders, child files and all descendant) and granted syncthing.net Read & Write permissions.
Probably it will be enough to grant only Read to /volume1/MyNAS/ and Read & Write to /volume1/MyNAS/6_Music/ but I will check that later.
Now I’m happy that I found the root cause and was able to solve the issue.
Thank to all of you who spend a time commenting and guiding me to the right direction where to look. Thanks a lot!
EDIT. NO! That wasn’t the root cause. The root cause is (sentence found in DSM Help - Media Indexing): " Multimedia files added to indexed folders via the NFS or SCP protocol will not be scanned automatically. To index such files, click Re-index"
So when files are copied to Synology by WinSCP via FTP then those files are indexed immediately.
I didn’t know that now, but I also came across the fact that new folders are not automatically indexed immediately. I think this is a bug in the DSM APP Universal Search.
That shouldn’t be the case. Did you previously install the SynoCmmunity package? Then that would be possible.
Check with WinSCP an entry in the /etc/group file, e.g. like
Yes, I had SynoCommunity Syncthing version installed previously but I had it uninstalled and syncthing group deleted manually
But all is clear now.
It is as DSM Help says: files added to indexed folders are being indexed automatically if those files are copied via FTP protocol but are not indexed when copied via SCP protocol.
And it looks that files synced by syncthing are also not indexed automatically - I have checked that those files are visible on TV only when I run Re-Indexing.