Unexpected executable permission bit change (also, xattrs setting)

English Support for Syncovery on Apple Computers.
tlsync
Posts: 2
Joined: Thu Mar 02, 2023 2:22 am

Unexpected executable permission bit change (also, xattrs setting)

Post by tlsync »

Hi Tobias (et al.)—

I'm using Syncovery to sync a largish directory (~700 MB) that includes a bunch of large binary data files (.fits files, storing astronomical data). The directory is a Git repo (I've used Syncovery to sync Git repos for many years without issues). Improperly, the creator of the repo set the executable bit on all of the binary data files.

If I `git clone` the directory from GitHub, the data files have the executable bit set. `git status` on the cloned repo shows no changes vs. Git's record of the files.

If I use Syncovery to copy the repo from one Mac to another, all of the executable bits get flipped off. `git status` then thinks that all of the data files have been changed (albeit just their permissions), and is saying they need to be added and committed. `git diff` on one of the files says:

Code: Select all

old mode 100755
new mode 100644
I.e., the executable permission bit has been flipped (which I've verified with `ls -l`).

The sync is using sftp via SBB, with Syncovery 10.2.7. I've looked through the settings for something obvious that might affect this, but don't see anything. However, there are lots of settings and perhaps I've overlooked something.

Is there a way to make Syncovery preserve the permissions for these files?

Incidentally, in the course of looking through the settings, I came across the Special->Extended attributes settings for the first time. The text there says:

Code: Select all

Extended Attributes are copied along with the files by default, if possible....
In most cases, you will want to keep the checkmark below chosen for the best behavior....
But the checkmark for "Copy Extended Attributes (if possible)" is *unchecked*. I've never adjusted these settings. Very few of my files have xattrs (so far), but a few do. Should this box be checked for all of my profiles? Any idea why it is unchecked if the default behavior is to copy xattrs?

-Tom L.

tobias
Posts: 1589
Joined: Tue Mar 31, 2020 7:37 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tobias »

Hello,
Syncovery does not transfer original permissions via SFTP, but you can manually specify the permissions on the second tab sheet of the Internet/FTP dialog:

X Set Unix Permissions To: 755

Can you try this?

tlsync
Posts: 2
Joined: Thu Mar 02, 2023 2:22 am

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tlsync »

Thanks for the help. I don't want *all* files to have 755 permissions; the developers did leave things like source an image files non-executable.

I'm thinking what I should have done is clone the repo locally first, before the sync, so that Git sets all the permissions as intended, and the sync just syncs the file content for files changed on the remote. That's what I often do for a new repo, so it's not a big deal to do it for this new repo.
X Set Unix Permissions To: 755
When I click that box (on or off) a dialog pops up asking me for "Path Prefix For Shell Commands". Is that expected behavior? What should I enter? Something like "/usr/bin"? Or just "/bin" (which is where "chmod" is)?

BTW, all of the affected files are in one directory, and a simple "chmod +x *.fits" took care of the problem and made Git happy. So my problem is solved for now. But if there's anything you'd like me to try, let me know.

tobias
Posts: 1589
Joined: Tue Mar 31, 2020 7:37 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tobias »

Hello,
sorry for the dialog, that's a bug. Please leave it empty. I will remove it.

I will consider enabling mirroring Unix permissions from local to SFTP.

arif1490
Posts: 9
Joined: Wed Nov 16, 2022 5:00 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by arif1490 »

hello Tobias,

I have Syncovery 8.69f

am copying from local(Windows) to SFTP(Linux)

I am losing the permissions on the destiantion and I would need 664 at least but I always end up getting 644.

could you please guide me on how to get the desired permissions in the destination SFTP?

And also, am not sure where to set this "X Set Unix Permissions To: 755" in Syncovery.

It would be really appreciated.

tobias
Posts: 1589
Joined: Tue Mar 31, 2020 7:37 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tobias »

Hello,
you need at least Syncovery 9. Then you will find the checkmark to set Unix permissions on the second tab sheet of the Internet Protocol Settings dialog.

arif1490
Posts: 9
Joined: Wed Nov 16, 2022 5:00 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by arif1490 »

hello Tobias,

Thank you for the response.

My setup is like -
Step1: Linux-1--> local-1
Step2: local-1 to Linux-2

I have similar setup with other servers but never faced such issues wherein permissions gets changed in the destination.

https://www.syncovery.com/documentation ... rmissions/ - I tried this but no luck

am I missing something? is there any other way?

please let know.

tobias
Posts: 1589
Joined: Tue Mar 31, 2020 7:37 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tobias »

Hello,
permissions copying/retaining is not supported via SSH/SFTP. Uploaded files will get the default permissions as configured in the SFTP server.

The only available option is to set specific permissions via the second tab sheet of the Internet Protocol Settings dialog, when uploading via SSH/SFTP.

This requires Syncovery 9 or later.

arif1490
Posts: 9
Joined: Wed Nov 16, 2022 5:00 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by arif1490 »

hello Tobias,

Sorry for reviving this old thread once again. Setting the desired file permission is still not working for us.

We just tried using Pascal script option to set the file permissions on the target directory which is linux server but ran into this error as shown in screenshot.

exception: CustomFTPCommand not implemented
Syncvoery pascal error.png
Syncvoery pascal error.png (46.49 KiB) Viewed 22222 times
can this error be overcome by deploying Cygwin on the same server where Syncovery(Windows server) is installed?

Please let know.

Also, we are planning to upgrade to version 9.50a (currently on 8.69f) ................ are there any special steps to be taken before upgrading ?

https://www.syncovery.com/documentation/faq/upgrading/ - I read this and it looks staright forward and we will be offline installer for 9.50a upgrade.

tobias
Posts: 1589
Joined: Tue Mar 31, 2020 7:37 pm

Re: Unexpected executable permission bit change (also, xattrs setting)

Post by tobias »

Hello,
it seems that a custom FTP command can only be used with FTP Library 1, which you can choose on the FTP dialog.

To upgrade Syncovery, you can just run the latest Setup program. It will update the software and all settings and profiles will be kept.

I do recommend upgrading to the latest version, which is currently 10. If your license is too old, you can see your upgrade options on our upgrade pages (www.syncovery.com/upgrade/).

Post Reply