KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Original question So the project I'm working on is deathly paranoid about file uploads. In the scope of this question, I'm not using that term in regards to payloads; I'm talking confidentiality . Programs can always crash and leave temporary files loafing around in the filesystem. That's normal. The slightly confidentiality-paranoid can write a cronjob that hits the temporary file folder every few minutes and deletes anything older than a few seconds prior to the cronjob call (not everything , simply because otherwise it might catch a file in process of being uploaded). ...unfortunately, we take this paranoid a step further: Ideally, we'd love to never see temporary files from file uploads anywhere but in process-associated RAM. Is there a way to teach PHP to look for temporary file as blobs in memory rather than in the filesystem? We use PHP-FPM as a CGI handler and Apache as our webserver, in case that makes it any easier. (Note also: 'Filesystem' is the keyword here, rather than 'disc', since there are of course ways to map the filesystem to RAM, but that doesn't fix the accessibility and automatic post-crash-clean-up issue.) Alternatively, is there a way these temporary files can be encrypted immediately when they're being written to disc , so that they're never held in the file system without encryption? Thread overview I can unfortunately only accept one answer - but to anyone reading this, the entire thread is extremely valuable and contains the collective insights of many people. Depending on what you are hoping to achieve, the accepted answer may not be interesting to you . If you've come here through a search engine, please take a moment to read the whole thread . Here is a compilation of usecases as I see them for quick reference: Re: PHP's temporar
Tags (comma-separated)
Save Edits
Cancel