Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Based on user request a temporary image file is supposed to be created on Apache's end. The file shall remain as long as user's session is maintained. Which is best was yo expose the location of this file, considering security reasons. Should it be inside /var/www/html/ or an alternate location

share|improve this question

migrated from stackoverflow.com Aug 1 '09 at 14:53

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You could put it in a nonbrowsable directory with some sort of generated (hash?) filename, and the filename would be only visible to the user. This way you can store all kinds of images in one directory (easy maintenance), but without people being able to peek on one another. And with a hash long enough (SHA-512 anyone?) the chance of anyone 'guessing' a filename would be astronomically small.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.