delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/28/14:55:53

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:message-id:subject:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=FRP
2mHcMAi/Id0vWb8Di0mByEm+uvspNsqw8X/q9Fsl+mWLwTFp9nt0v/Lwi6FeCy1j
G2Qg8v7Oorg+TrDZFMxs38YpVd0zbB1lrUIQKgrlWGFrvT/Hfh1VgbcziEgclsj1
vJisuV7mB4YfB+TXNmibgcyASGqmxOh8sxA4DH8c=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:message-id:subject:mime-version
:content-type:content-transfer-encoding; s=default; bh=Q9eLjOKq8
buYGF1UsIl00xB2Xls=; b=BAHtPAZC0T4eWYuOfFauLhcQdMLUEKM0RIfIZ82l+
kis3Dkh4qkJAvL13QusUugyEpqWFsufVNUIEgu9j1lEGIgk355YbgnQLXIVA8FJu
7XPayVXxTpuOOkX42/wj1Uvm6deS1M94DQgPRi8+cSmLD8UqQRM3XSCOMNnSGu5s
HU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=BAYES_05,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2
X-HELO: sneak2.sneakemail.com
Date: Wed, 28 Oct 2015 14:55:29 -0400
From: "Alex" <by7eth29fh AT snkmail DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <3807-1446058529-722065@sneakemail.com>
Subject: Unison 2.43.3 fails to synchronize execute permission bit
MIME-Version: 1.0

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019