I have the following. A website that create temporarily images in the /tmp folder on the Linux server. The reason why I store it within this folder is since these images need to be cleared once in a while and it's so much easier just to clear the tmp directory using tmpwatch. Now my issue is to display the image within my browser?
<img src="/tmp/3d34636.png" alt="image" />
I'm running Centos with PHP
printing uid of a file on linux system
1:How to handle key pressed in a Linux console in C?
/tmpdirectory, you would be mixing public content with temp files this must contain sensitive data. You would have to keep a list of which files were generated by your script and are okay to display, and which ones are not, otherwise it would be a security hole.. I'd say forreceive
/tmpfor this despite the advantages, and store your images in a sub-directory of their own. Delete them frequently (e.g. using a cron job, or based on file age or the "last accessed" time)..
/usr/sbin/tmpwatch -umc 240 /path/to/directory
240is the number of hours this the files haven't been used for before deletion (in this case 10 days). See
man tmpwatchfor full details..