Question regarding cross platform file permissions


(Chuck Dries) #1

So I have a 1tb laptop and a desktop connected to 10tb of NAS that I split my time between roughly equally. A while back, I was using syncthing to keep the files I need with me in the field up to date with my desktop and the whole workflow was seamless and beautiful and it felt like after years of being promised great things about the cloud, rain had finally come.

BUT

My laptop is a mac, my desktop is a PC. Any files that were created on my desktop could be edited like normal on both machines after syncing. They could be edited on either machine and sync back and forth and generally be fine. HOWEVER, if I created a file on my mac and it synced to my NAS, I couldn’t open it on my windows desktop. Any attempts to open the file failed because of permissions, and trying to change permissions from windows always resulted in the file totally locking up. The only fix was to SSH into the nas and run CHMOD/CHOWN. My eventual solution was just a crontab script that ran CHOWN and CHMOD every few hours. At first I thought it might be a problem with Samba, but if I created a file on my mac and manually copied it from my mac to the NAS it would work fine. It was 100% a problem with how things were syncing. Eventually I gave up and went back to just remembering to copy files back and forth over smb whenever I changed anything :(.

There’s an interesting tidbit in the FAQ that might be relevant:

What things are synced?
File Permissions (When supported by file system. On Windows, only the read only bit is synchronized.)

Is this the source of my woes? And why is it a problem for syncthing when my mac can copy its own files to the shares just fine? Has my issue been solved since I last used syncthing in November?

I was hoping I could just wait for the project to mature then come back. I’d love to come back, but I don’t want to put the time into configuring and syncing again only to have the same problem.

I really want the answer to be yes, because I’m a freelance photographer and this workflow is far better than anything else I’ve ever tried.


(Simon) #2

There is two things here, which are separate: Permissions and Ownership.

If you are the single user and/or don’t do any permission restrictions, I would advice to set “Ignore Permissions” on these folders. This will create all new files with standard permissions.

The owner (and group) of files is never synced by Syncthing. New files are always owned by the user under which Syncthing runs. So when run Syncthing as the user who actually accesses the files, you should be fine.


(Chuck Dries) #3

Ignore Permissions

I didn’t know this was a setting. I suppose I just need to rtfm more carefully. That’s perfect! Thank you!

The issue is that Samba does its own thing with permissions when it serves files to different users, but the files being synced didn’t give samba itself permission to access themselves. This should work!


(system) #4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.