This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Unison 2.43.3 fails to synchronize execute permission bit
- From: "Alex" <by7eth29fh at snkmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 28 Oct 2015 14:55:29 -0400
- Subject: Unison 2.43.3 fails to synchronize execute permission bit
- Authentication-results: sourceware.org; auth=none
When synchronizing two directories on the same NTFS-formatted drive, unison (with -perms 0o1777) fails to set execute permissions on new files. (It also fails to detect changes in execute permissions and to set them on existing files.)
I am running Cygwin 64-bit from setup version 2.873. Below is a script to test this phenomenon for new files. It creates and later destroys a sandbox directory under /tmp/.
Thank you all for your time and efforts on the Cygwin project. I have been a happy user for over 10 years.
Alex Hankins
----------
#!/usr/bin/bash
# File: test-whether-unison-preserves-execute-permissions.bash
# Test whether unison (and the filesystem housing /tmp)
# synchronizes execute-bits on new, local files.
# Comment out to turn off script debugging:
#set -x
# We need to clean up after the test is done, so we use this flag to
# determine the exit status later.
#
success="false"
umask 700
# Try to create a temporary directory to store all test files.
#
tmpDir="/tmp/unison.$$"
if ! mkdir "${tmpDir}"; then
echo >&2 "${0}": cannot make temporary directory.
exit 1
fi
export UNISON="${tmpDir}/.unison" # Keep ~/.unison clean.
mkdir "${UNISON}"
mkdir "${tmpDir}/a" "${tmpDir}/b"
touch "${tmpDir}/a/foo"
chmod u+rwx,go= "${tmpDir}/a/foo"
echo "----- Before synchronization:"
ls -lRa "${tmpDir}"
echo
echo "----- Running unison."
unison -batch -debug all -log=false -perms 0o1777 "${tmpDir}/a" "${tmpDir}/b"
echo
echo "----- After synchronization:"
ls -lRa "${tmpDir}"
echo
if [ -x "${tmpDir}/b/foo" ]; then
success="true"
else
echo >&2 "${0}: test failed (for filesystem housing /tmp): execute bit not preserved"
success="false"
fi
# Clean up the temporary directory we made.
rm -r "${tmpDir}"
if [ "${success}" = "false" ]; then
exit 1
fi
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple