views:

42

answers:

1

My PassengerTempDir is at /home/passenger/tmp, because /home is on a larger partition than /

While uploading some large files to test this configuration, "du /home/passenger" reveals a small amount of space being used; but "df" shows the /home partition rapidly losing available space.

If I move PassengerTempDir to another partition, "df" shows that partition is buffering the uploads, but du reports that the PassengerTempDir is not changing in size.

How does Passenger hide file sizes from du? Or is something else going on? I am missing something here ...

+1  A: 

It uses anonymous file handles. It opens a file and then immediately unlinks it before writing data to the file. This allocates an inode on disk but no other processes can access it, allowing for increased security. When the last process closes the file handle the operating system will automatically remove the inode from disk.

Hongli