WordPress File Permission Problem Bypass FTP Update Theme Plugins
add this line to the wp-config.php file
some people say its not safe. well it depends. if you have multiple users using the dashboard or your wordpress site is open to registers dont use this method.
just fix your apache writing problem or use ftp connect method.
but if you are like me only you are the admin on your wordpress sites it is ok to use this method. dont worry.