|
From: massimo s. <mas...@un...> - 2006-06-13 09:10:00
|
Fernando Perez ha scritto:
> This shows the benefits of 'xmode verbose' :) There's enough info in
> that traceback to understand the problem:
> This is the call that fails. To confirm this is the problem, try:
>
> shutil.move('/tmp/foo','/fat32partition/foo')
> With any valid /tmp/foo file and your actual path to your fat32
> partition.
Yes, it fails in the same way:
In [5]: xmode verbose
Exception reporting mode: Verbose
In [6]: shutil.move('/tmp/tmp_Tzxny','/users/Massimo/')
---------------------------------------------------------------------------
exceptions.OSError Traceback (most
recent call last)
/home/massimo/<ipython console>
/usr/lib/python2.4/shutil.py in move(src='/tmp/tmp_Tzxny',
dst='/users/Massimo/')
191 rmtree(src)
192 else:
--> 193 copy2(src,dst)
global copy2 = <function copy2 at 0xb7d8bb1c>
src = '/tmp/tmp_Tzxny'
dst = '/users/Massimo/'
194 os.unlink(src)
195
/usr/lib/python2.4/shutil.py in copy2(src='/tmp/tmp_Tzxny',
dst='/users/Massimo/tmp_Tzxny')
91 dst = os.path.join(dst, os.path.basename(src))
92 copyfile(src, dst)
---> 93 copystat(src, dst)
global copystat = <function copystat at 0xb7d8baac>
src = '/tmp/tmp_Tzxny'
dst = '/users/Massimo/tmp_Tzxny'
94
95
/usr/lib/python2.4/shutil.py in copystat(src='/tmp/tmp_Tzxny',
dst='/users/Massimo/tmp_Tzxny')
66 mode = stat.S_IMODE(st.st_mode)
67 if hasattr(os, 'utime'):
---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
global os.utime = <built-in function utime>
dst = '/users/Massimo/tmp_Tzxny'
st.st_atime = 1150188691
st.st_mtime = 1149762561
69 if hasattr(os, 'chmod'):
70 os.chmod(dst, mode)
OSError: [Errno 1] Operation not permitted: '/users/Massimo/tmp_Tzxny'
> which in turn tries to call utime():
>
>> /usr/lib/python2.4/shutil.py in
>> copystat(src='/tmp/caba709a5ee736ae3148af077a1a9a38', dst='prova.eps')
>> 66 mode = stat.S_IMODE(st.st_mode)
>> 67 if hasattr(os, 'utime'):
>> ---> 68 os.utime(dst, (st.st_atime, st.st_mtime))
>> global os.utime = <built-in function utime>
>> dst = 'prova.eps'
>> st.st_atime = 1150101622
>> st.st_mtime = 1150101622
>> 69 if hasattr(os, 'chmod'):
>> 70 os.chmod(dst, mode)
>>
>> OSError: [Errno 1] Operation not permitted: 'prova.eps'
>
> is somehow not OK for fat32 partitions, or because you don't have the
> right permissions on your system.
> You need to be sure that you have your fat32 partition mounted with
> the right user permissions, otherwise things like these can fail.
My /etc/mtab line for the partition is as follows:
/dev/hda7 /users vfat rw,utf8,umask=000,gid=46 0 0
this should mean everyone has full permissions on the partition, isn't it?
> At this point, it's not yet clear if this is a problem with backend_ps
> in mpl or your permissions configuration.
5-minute googling lets me wonder if it's a problem with os.utime() not
always playing nice with fat32 partitions... odd because on my previous
debian sarge with the same configuration, it didn't complain.
m.
--
Massimo Sandal
University of Bologna
Department of Biochemistry "G.Moruzzi"
snail mail:
Via Irnerio 48, 40126 Bologna, Italy
email:
mas...@un...
tel: +39-051-2094388
fax: +39-051-2094387
|