◐ Shell
clean mode source ↗

Issue 3253: shutil.move bahave unexpected in fat32

Build the environment in a fat32 file system:
$echo test > test_move
$mkdir testmove

If I shutil.move('test_move', 'testmove'), it will raise: 
Traceback (most recent call last):
  File "testmove.py", line 5, in <module>
    shutil.move('test_move', 'test_python')
  File "/usr/lib/python2.5/shutil.py", line 199, in move
    copy2(src,dst)
  File "/usr/lib/python2.5/shutil.py", line 92, in copy2
    copystat(src, dst)
  File "/usr/lib/python2.5/shutil.py", line 69, in copystat
    os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: 'test_python/test_move'

If I shutil.move('test_move', 'testmove/testmove'), it will succeed
quietly. This problem doesn't happen in an ext3 file system.