﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8403	Current file locking does not work on NFS mounts	Malcolm Tredinnick	Malcolm Tredinnick	"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]."		closed	File uploads/storage	dev		fixed	file lock		Accepted	0	0	0	0	0	0
