Hi guys, More issues with temporary files. I'm trying to find a place (directory) to use for writing a set of long-term temp files (cache files). So far, I have found these two calls: ap_server_root_relative(p, "logs/") and apr_temp_dir_get((const char**)&temp_dir, p);
Problems: (1) Neither guarantees that the directory exists (2) There is no guarantee that the user Apache is running as will have permissions to write to this directory (even if I create it... as root) ** **Apache must run as root to access port 80 (the usual case), but can be set to switch to another user (apache | nobody | some other user) before the multiple child processes are created. If I create a directory, I can set permissions, but I can not set the permissions of the components of the path necessary to traverse to the temp directory. My question is: How does Apache write to the access and error logs? Can I use the same code to write to the same directory?* * I need to write to my own file(s) not write to existing log files (my cache files are serialized structs). Does anyone else know of a well-tested module that can handle user-switching and writing to logs gracefully? Thanks, Dave -- David Wortham Senior Web Applications Developer Unspam Technologies, Inc. 1901 Prospector Dr. #30 Park City, UT 84060 (435) 513-0672
