decker-edu / decker

A markdown based tool for slide deck creation.
GNU General Public License v3.0
55 stars 13 forks source link

decker publish from a Windows machine does not set directories to exectuable on the remote machine #18

Closed salbeira closed 1 year ago

salbeira commented 1 year ago

This is a very annoying error:

On Windows it seems that the default file permissions retrieved from cwrsync are (d)rwx------.

If you use our decker publish which calls:

rsync --recursive --no-group --perms --chmod=a+r,go-w --no-owner --copy-links public/ user@host:path

on a Windows machine (with a custom installation of e.g. cwrsync to have access to the rsync program on the Windows machine) it sets the r and removes the w flags on the transferred files but it does not make sure that directories transferred have the x-flag for non-owners.

In addition, all files are default executable, something probably not desirable on a machine that is used by more than one person.

Therefore passing --chmod=a-x,a=rX,u+w sadly does not work as it sets the x flag back on all entries.

The cheap and easy solution would be to change the --chmod-part to: --chmod=u=rwX,go=rX, but that sets ALL files to executable because they were executable to begin with.

Manually fixing with sudo find /path/ -type d -exec chmod g+x,o+x {} + is possible but undesirable.

salbeira commented 1 year ago

OK the issue is that you need an additional configuration file in the installation of your cwrsync by adding a file called "fstabs" into the /etc/ directory that comes with it and adding the following line to it:

none /cygdrive cygdrive binary,posix=0,user,noacl 0 0