How does one go about safely write a temporary file to a location within an application server that is publicly accessible?
|
It depends on "safely". If you want to avoid read or write access from other users of the same machine, then you should rely on the access rights provided by the operating system (if the OS is hostile, then you already lost). On Unix-like systems, use the |
|||
|
My recommendation would be to ensure that this temporary file is written outside of the webroot. This ensures that it cannot be accessed through a simple web browser call. The rest is up to the OS as Tom points. |
|||
|
|
