www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Bob Erb <rerb AT progress DOT com> |
Subject: | Puzzling mv "permission denied" behaviour |
Date: | Wed, 04 Feb 2009 13:07:54 -0500 |
Lines: | 40 |
Message-ID: | <uhc3ars79.fsf@progress.com> |
Mime-Version: | 1.0 |
User-Agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (windows-nt) |
X-IsSubscribed: | yes |
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 |
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 $ uname -a CYGWIN_NT-5.1 pcrerb1 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin Thanks for any answers. - Bob Erb -- 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 |