www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Thu, 5 Feb 2009 11:06:58 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Puzzling mv "permission denied" behaviour |
Message-ID: | <20090205100658.GO16129@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <uhc3ars79 DOT fsf AT progress DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <uhc3ars79.fsf@progress.com> |
User-Agent: | Mutt/1.5.17 (2007-11-01) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On Feb 4 13:07, Bob Erb wrote: > I get a "permission denied" problem with mv that I don't understand > when using mv to rename a directory. I have sufficient priveleges to > mv the contents of the directory, and then, when empty, I can mv the > directory. Why can I only mv the directory when it's empty, while I > can mv the contents of the directory separately? > > Here's an illustration; I want to mv directory daily.18 to daily.19: > > $ ls # No daily.19 here. > daily.0 daily.11 daily.14 daily.17 daily.3 daily.6 daily.9 > daily.1 daily.12 daily.15 daily.18 daily.4 daily.7 > daily.10 daily.13 daily.16 daily.2 daily.5 daily.8 > $ whoami > rerb > $ ls -ld # I have privs to mess around here. > drwx------+ 21 rerb Domain Users 0 Feb 4 12:40 . > $ ls -ld daily.18 # I've got full perms on daily.18. > drwxr-xr-x+ 3 rerb Domain Users 0 Feb 4 12:56 daily.18 > $ mv daily.18 daily.19 > mv: cannot move `daily.18' to `daily.19': Permission denied > $ ls -al daily.18 # What's in daily.18? > total 0 > drwxr-xr-x+ 3 rerb Domain Users 0 Feb 4 12:56 . > drwx------+ 21 rerb Domain Users 0 Feb 4 12:56 .. > drwxr-x---+ 53 rerb Domain Users 0 Dec 18 18:02 home > $ mv daily.18/home . # I can move the contents of daily.18. > $ mv daily.18 daily.19 # I can move daily.18 when it's empty. > $ mv home daily.19 # I can move the contents of daily.18 back into daily.19. > $ mv daily.19 daily.18 # Why can't I move daily.19 back to daily.18? > mv: cannot move `daily.19' to `daily.18': Permission denied Works for me. One reason of this behaviour could be a process having an open handle on something in this dir. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |