#8403: Current file locking does not work on NFS mounts
----------------------------------+-----------------------------------------
 Reporter:  mtredinnick           |       Owner:  nobody    
   Status:  new                   |   Milestone:  1.0       
Component:  File uploads/storage  |     Version:  SVN       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 The code in `django.core.files.locks` assumes that `flock()` is safe to
 use on every POSIX system to lock files. This isn't the case when the
 filesystem in question is a relatively recent NFS system. In that case,
 `flock()` actively raises an error (rather than potentially silently
 failing to lock things, which was the older behaviour). For those
 situations `fnctl()` should be used to do file locking.

 From a bit of a search around and some source reading (plus some comments
 on the Mailman list, although I've avoided reading the relevant code there
 for the moment, since it's GPL and I might end up being the person who
 fixes this ticket), it looks like posixfile.lock() in the Python source is
 an appropriate way to do this.

 I realise the `locks.py` file isn't our source, but it is broken in this
 respect and we do include it. So we have to fix it, since, right now, you
 can't save files to an NFS-mounted filesystem.

 This effect in Django was initially noticed in
 [http://groups.google.com/group/django-
 users/browse_thread/thread/384c3ec44672cb02 this django-users thread].

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8403>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to