Puller (folder "Documents", file "XXX"): shortcut: chmod /Users/YYY/Documents/XXX: operation not permitted

To add one more element, I checked the same subfolder on the other mac (which is not having the same problems in SyncThing), and the permissions are set the same (drwx------@). So I am not sure why this subfolder would cause problems on one machine but not the other.

I should point out that apart from these issues, syncing seems to be occurring as expected - any new document is synced within a few minutes of saving it.

Hi @xsyncguy

Glad you are getting somewhere, and the information was useful to you!

An account on a Mac with admin capabilities is ok to use. It does not mean it is big security risk, as you still need to enter your password whenever you escalate your privileges to install a program, or run an admin command in Terminal (ie using the sudo command).

You are not running as admin all the time - you just have the capability to escalate to a admin user if required. Also someone has to admin the computer :smile:

This ‘admin account’ concern mainly comes from the Windows world - when older versions of windows didn’t provide this separation between user and admin. These days even that situation has improved with the introduction of Windows User Account Control (UAC). So dont be too concerned about your accounts having admin capabilities - it isn’t the same as running as a root user all the time. All security is about managing risk - balanced against being able to do what you need too do - like enjoying using your computer!

With regards to your questions:

The drwxr-xr-x in a listing indicates a directory or folder (same difference). So when you see output of ls -l similar to below:

MystixMac:test deb$ ls -l
total 0
drwxr-xr-x  2 deb  staff  68 27 Dec 22:32 test-dir1
drwxr-xr-x  2 deb  staff  68 27 Dec 22:32 test-dir2
-rw-r--r--  1 deb  staff   0 27 Dec 22:32 testfile1.txt
-rw-r--r--  1 deb  staff   0 27 Dec 22:32 testfile2.txt

The first two shown above test-dir1 and test-dir2 are directories - indicated by the d and then followed by the permissions for that directory - which work the same as described earlier for files. The two others listed testfile1.txt and testfile2.txt are just files - so they are missing the leading d.

With regards the @ symbol - this indicates the file or directory has extended attributes. These are additional bits of information the computer stores about the file or directory. The command: ls -l@ will show you additional information for the extended attribute. These are managed with the command: xattr (see man xattr for more information). These are quite common on Mac files systems, and the attributes have probably been added by whatever application was used to create the files in the first place (Word processor, drawing application, etc).

As it is only you using the computer (ie one user account ZZZ) on each - then you should not have to worry about other uses on the computer snooping into your files - which the restrictive permission guard against. You can therefore make the permission less restrictive - and see if this fixes Syncthing problems.

As you suggested - you could try changing the permissions on the directories with the permission drwx------@ which only allows the user access at the moment.

As per the listing above - I have changed the test-dir1 to match the permssion you are seeing. This was done with the command: chmod 700 test-dir. The listing now looks like this:

MystixMac:test deb$ ls -l
total 0
drwx------  2 deb  staff  68 27 Dec 22:32 test-dir1
drwxr-xr-x  2 deb  staff  68 27 Dec 22:32 test-dir2
-rw-r--r--  1 deb  staff   0 27 Dec 22:32 testfile1.txt
-rw-r--r--  1 deb  staff   0 27 Dec 22:32 testfile2.txt

If I run the command: chmod 755 test-dir1 it changes the permissions too:

MystixMac:test deb$ ls -la
total 0
drwxr-xr-x   6 deb  staff  204 27 Dec 22:32 .
drwxr-xr-x+ 22 deb  staff  748 27 Dec 22:32 ..
drwxr-xr-x   2 deb  staff   68 27 Dec 22:32 test-dir1
drwxr-xr-x   2 deb  staff   68 27 Dec 22:32 test-dir2
-rw-r--r--   1 deb  staff    0 27 Dec 22:32 testfile1.txt
-rw-r--r--   1 deb  staff    0 27 Dec 22:32 testfile2.txt

You can alter all the directories and files to be the same permission with: chmod 755 * - but be careful you dont run this in the wrong folder when in Terminal!

Try changing a few of the files and directories on the computer that Syncthing has issues with - and then see if it reduces the number of files it is flagging as problems.

Hope that sorts it for you!

Cheers

Simon

Thanks again for your help with this and all the time you are taking.

I changed the permissions (chmod 755) on all of the directories that had files that were not being synced, and restarted Syncthing. It has not made a difference in the number of files that are flagged as being out of sync. And I still get the message about “Folder “Documents” isn’t making progress - check logs for possible root cause. Pausing puller for 1m0s” (BTW where is the log file located?)

Noting that I had already enabled “Ignore permissions” in Syncthing on both Macs and the Synology, I am not sure if the permissions issue is what is causing this problem?

Anything else I can try?

Hi @xsyncguy

This is frustrating! Hopefully we will get it fixed in the end :smile:

Did you also change the permissions on the files in those directories too - or are they all ok anyway? The directory permission only affects that directory itself - not the contents (ie the files and any other sub directories inside it).

It still sounds like Syncthng (based on the error and info posted by @AudriusButkevicius earlier too) that Syncthing is unable to access the files correctly. This is odd as based on your ps -auxww command output you posted shows the user ZZZ as the owner of the Syncthing process, and you said that ZZZ matches the owner of the files too, and also the owner (ZZZ) has at least rw- file access - so very strange. I am not sure what you can do next really.

The only other suggestions I could make are :

I also saw in an earlier post that you are running Syncthing using the information here: Mac OS X - Menu Bar Item and Dock Icon (with context menu) ¡ Issue #982 ¡ syncthing/syncthing ¡ GitHub You could try (if even temporarily until it is working properly) a simpler approach of using the information here: https://github.com/syncthing/syncthing/tree/master/etc/macosx-launchd Uninstall the other version first though if you try this - or you may end up with two programs trying to start Synchting.

This launchd only is the method I use on several Macs without any issues. Not saying there is anything wrong with the other approach - just this other one is very simplistic and just uses the ‘Mac’ launchd that is part of Mac OS X.

You could also try (bit more drastic though):

  1. stopping Syncthing all your machines
  2. back up the files & directories affect on your Mac with the file issues
  3. delete the files on the Mac with issues (make sure you have a back up & Syncthing is definitely turned off on all you machines - or it will replicate the delete!!!)
  4. copy the files from the working Mac, to the affected Mac (working one → other one) using a flash drive/USB stick/external hard disk. This manually copies the files from the working Mac to the one you just deleted the files from - so you have two identical copies again on each computer.
  5. Once the same files are on both again Macs via above manual copying - restart Syncthing - as both files sets match on each Mac - there should be no issues…

Might be worth a try - unless anyone else can suggest other approaches for you that I have missed, that are less drastic!

Just make sure you back up those files first! That way - you can always put them back from your backup copy should it not work, or something goes wrong.

I took the drastic step of erasing the entire Documents folder from the problem machine, and recopying it (via external HD) from the Mac that that is working properly. I got the same error, and it is listing the same files as being out of sync (even though they were copied from the other Mac).

Very confused by what is happening here…