www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/28/17:31:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <40E08C73.2070304@veritech.com>
Date: Mon, 28 Jun 2004 17:24:03 -0400
From: LDR <lee AT veritech DOT com>
Reply-To: lee AT veritech DOT com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608
MIME-Version: 1.0
To: Cygwin eMail List <cygwin AT cygwin DOT com>
Subject: chmod -- Setting the sticky bit for/from the current directory
References: <40E04F02 DOT 7090301 AT veritech DOT com>
In-Reply-To: <40E04F02.7090301@veritech.com>

| The following script excerpt explains the problem best:

#!/usr/bin/bash
...

#   Set the sticky bit and get the ownership & permissions of the
# current dir right

#   Convoluted logic, here of moving up a directory level to change
# the sticky bit on what was the current directory was required by:
#     chmod +t .
# works from the 'bash' command line but not from a 'bash' shell
# script.
#   Same for:
#     chmod +t $PWD

pwd1=$PWD
cd ..
chmod -v +t $pwd1
cd $pwd1

...

Note that the interactive shell as well as the script shell  are 'bash', 
although the
interactive shell is invoked as /bin/bash, rather than /usr/bin/bash.

Is this a feature or a bug? Why? Is it Cygwin-specific, Bash-specific, 
or what?

signed,

intermmittentLee sTicky :-P


|




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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