[lug] how to handle open files - upload server

Bear Giles bgiles at coyotesong.com
Tue Jan 13 15:34:51 MST 2004


rm at fabula.de wrote:
>  A _big_ caveat: all these techniques use non-atomic operations and
>  hence are vulnerable to race conditions (well, i'm not shure about
>  exclusive locking allone, i'd have to look it up).

Locking is handled in the kernel, so atomic operation shouldn't be 
a problem.

As for whether the files are locked, check 
/usr/src/linux/Documentation/locks.txt and mandatory.txt.  The OP 
may need to mount the incoming directory with some special mount 
flags, but he should be using a dedicated partition anyway to 
prevent a DOS attack by somebody sftp'ing /dev/null at him. :-)

Bear




More information about the LUG mailing list