ovh / svfs

The Swift Virtual File System
Other
374 stars 54 forks source link

Option to ignore chmod and chown failure #138

Closed spirann closed 6 years ago

spirann commented 7 years ago

It would be nice if we could use a parameter for chmod or chown to fail silently. I know changing owner or access rights is not possible but some standard libraries like python's shutils.py try to chmod the file after a move for example. In this case chmod fails and so the shutils.py move function, even if the file is correctly copied to svfs.

ex: in move copy2(src, real_dst) File "/usr/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/usr/lib/python2.7/shutil.py", line 100, in copystat os.chmod(dst, mode) OSError: [Errno 95] Operation not supported

kayrus commented 7 years ago

I'd suggest to cover all limitations here

xlucas commented 7 years ago

Do you mean "fail silently" ?

kayrus commented 7 years ago

jfyi: I made a terrible hack for Java's createNewFile method. In my case this is quite safe, but for others this might be dangerous.

xlucas commented 6 years ago

The behavior is documented in the limitation section already.