NetBSD Problem Report #39606

From www@NetBSD.org  Mon Sep 22 03:27:01 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 421D363BC83
	for <gnats-bugs@gnats.netbsd.org>; Mon, 22 Sep 2008 03:27:01 +0000 (UTC)
Message-Id: <20080922032700.EDE6663BA98@narn.NetBSD.org>
Date: Mon, 22 Sep 2008 03:27:00 +0000 (UTC)
From: Ephaeton@gmx.net
Reply-To: Ephaeton@gmx.net
To: gnats-bugs@NetBSD.org
Subject: mv acts funny when copying to msdosfs
X-Send-Pr-Version: www-1.0

>Number:         39606
>Category:       bin
>Synopsis:       mv acts funny when copying to msdosfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 03:30:00 +0000 2008
>Originator:     Martin S. Weber
>Release:        4.99.72 / i386
>Organization:
>Environment:
NetBSD agamemnon.entropie.local 4.99.72 NetBSD 4.99.72 (AGAMEMNON) #4: Sat Sep 20 20:45:58 EDT 2008  root@agamemnon.entropie.local:/home/netbsd/obj/sys/arch/i386/compile/AGAMEMNON i386
>Description:
When mv moves a file it tries to set the utimes etc. on the target file. This can fail because the target lives on a filesystem which does not support permissions or seting times, for example msdosfs. It then would complain per file copied and not remove the source. This only happens though when moving a whole directory onto such a filesystem. When moving just a file, it would complain and DO remove the source.
>How-To-Repeat:
cd /tmp
dd if=/dev/zero of=msdos.bin bs=1m count=10
vnconfig vnd0 /tmp/msdos.bin
newfs_msdos /dev/rvnd0a
mkdir -p mnt
mount -t msdos /dev/vnd0a mnt
mkdir -p dir
touch dir/file1
touch dir/file2
chown -R nobody dir
mv dir mnt
echo "? : $?"
[ -d dir ] && echo "dir still exists here..."
[ -d mnt/dir ] && echo "dir also exists there..."
# output:
# ? : 1
# dir still exists here...
# dir also exists there...
>Fix:
I'd say beer but..
maybe should have a way to determine features of the target filesystem and then act accordingly? I.e. not try to set permissions/ownership on a filesystem that does not support it, not complain, not exit with 1 in that case.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.