NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/39606: mv acts funny when copying to msdosfs



>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@localhost:/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.



Home | Main Index | Thread Index | Old Index