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.
 ../wp-admin/includes/file.php
echo ( $uploads[‘path’] );
echo ( is_writable($uploads[‘path’]) ) ? ‘writable’ : ‘not writable’;
if ( is_writable($uploads[‘path’]) ) {
    copy( $tmp_file, $new_file );
    unlink($tmp_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 Wolschlager is the owner of Wolmerica Technologies LLC and holds a (93) Bachelors of Science degree in Computer Science with a minor in Mathematics from Saginaw Valley State University. Richard has worked in the Information Technology field for 20 years on a variety of platforms and lines of business.
This entry was posted in Apache httpd, WordPress. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *