Apache unable to write to files and folders after Fedora 16 upgrade

I’ve recently upgraded to Fedora 16.  After the upgrade, Apache was unable to save media files to the server as it was able to do prior to the upgrade.
Here are a few additions to the WordPress “file.php” to determine if  a directory is writable.
echo ( $uploads[‘path’] );
echo ( is_writable($uploads[‘path’]) ) ? ‘writable’ : ‘not writable’;
if ( is_writable($uploads[‘path’]) ) {
    copy( $tmp_file, $new_file );
} else {
    return $upload_error_handler( $file, sprintf( __(‘Uploads directory IS NOT writable %s to COPY( %s, %s ).’ ), $uploads[‘path’], $tmp_file, $filename ) );
After attempting every possible permission configuration I could think of I discovered another posting about Fedora 16 that suggested the following command that solved the problem
sudo setenforce 0

About admin

Richard has worked in the Information Technology field for 25 years on a variety of platforms and lines of business.
This entry was posted in Apache httpd, WordPress. Bookmark the permalink.