3

I create a Unison setup between my work computer and my desktop at home. This way, I can continue my work at home (and vice versa), even when I forgot to commit something to GIT at work (and vice versa).

In my Unison profile, I am using the following properties:

auto          = true
batch         = true
silent        = false
confirmbigdel = false
times         = false
perms         = 0
prefer        = newer
copythreshold = 0
copyprog      = /usr/bin/rsync -avz -X --checksum --partial --append-verify -e ssh
copyprogrest  = /usr/bin/rsync -avz -X --checksum --partial --append-verify -e ssh

This does the job, except for one small thing: the executable flag is not transferred. When I apply changes on a .sh file at work, I have to manually do chmod +x again on my computer at home.

Is it possible to transfer this flag?

1 Answers1

2

From the manual:

perms n

The integer value of this preference is a mask indicating which permission bits should be synchronized. It is set by default to 0o1777: all bits but the set-uid and set-gid bits are synchronised (synchronizing theses latter bits can be a security hazard). If you want to synchronize all bits, you can set the value of this preference to −1. If one of the replica is on a FAT [Windows] filesystem, you should consider using the t fat preference instead of this preference. If you need Unison not to set permissions at all, set the value of this preference to 0 and set the preference t dontchmod to t true.

  • perms -1 will do what you want.
Rinzwind
  • 309,379