File permissions are not preserved

Get help for specific problems
Posts: 4
Joined: 17 Nov 2021

JeremieBourque1

Hi,

I am using FreeFileSync to syncronize files between two computers running Ubuntu 20.04 using SFTP. Some of these files are python files that were made executable with the command
chmod +x file.py
In the options of FreeFileSync, I have "Copy file access permissions" checked.

However, after the sync is complete, the python file is no longer an executable on the other computer. This isn't a problem if I simply copy the file via SFTP with an application such as FileZilla.

Any idea on how to fix this?

Thanks
Posts: 1038
Joined: 8 May 2006

therube

Copy file access permissions
States that is "requires administrator rights".
On Windows, that would imply needing to run FFS.exe "as Administrator".

On Linux, maybe it needs su -c FFS or something like that?
Posts: 4
Joined: 17 Nov 2021

JeremieBourque1

I tried running FreeFileSync with sudo but I get the same problem.
The command I used is:
sudo freefilesync
I don't know if it helps but the version I have installed is 11.14
Posts: 1038
Joined: 8 May 2006

therube

Is it only .py files where this happens?
If you chmod +x a .txt file & sync that over, does that also lose the execute attribute?
Posts: 4
Joined: 17 Nov 2021

JeremieBourque1

Yes it also loses the execute attribute for a .txt file.
The permission flags before synching is -rwxrwxr-x and after synching it's -rw-rw-r--
Posts: 4
Joined: 17 Nov 2021

JeremieBourque1

I tried synching between two folders on one computer instead of across two computers and the permissions were preserved. So the problem only happens with SFTP.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

Preserving existing file permissions is something FFS currently doesn't handle:
viewtopic.php?t=6881