I make the following call to the Apache Portable Runtime library (version 1.4):
result = apr_file_open(
&file,
pathname,
APR_FOPEN_CREATE |
APR_FOPEN_EXCL |
APR_FOPEN_APPEND |
APR_FOPEN_BINARY |
APR_FOPEN_XTHREAD |
0,
APR_OS_DEFAULT |
0,
pool
);
if ( APR_SUCCESS != result ) {
fprintf(
stderr,
"could not create file \"%s\": %s",
pathname,
apr_errorstr( result )
);
}
and pathnamecontains a string /tmp/tempfile20110614091201.
I keep getting the "Permission denied" error (result code APR_EACCES), but I have read / write permissions to /tmp- what could be the reason for this?
source
share