Title: Directory not writable?
Last modified: August 20, 2016

---

# Directory not writable?

 *  [thanatica2](https://wordpress.org/support/users/thanatica2/)
 * (@thanatica2)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/)
 * I’m trying to update WordPress from the web interface. Doesn’t work, it asks 
   for FTP settings, but I don’t use FTP. I need wordpress to update itself.
 * The directory that wordpress sits in, is writable, afaik.
 * the www directory itself (perm/user/group):
    drwxrws— martijn www
 * **ALL** subdirectories on all levels:
    drwxrws— martijn www
 * **ALL** files in it and in all subdirectories:
    -rw-rw—- martijn www
 * martijn is just the owner. No problems there. www is group that has the www-data
   user as one of its members. www-data is the user that Apache starts with (I’m
   not sure how standardized this is, but it’s the default for my Ubuntu box).
 * This in my mind makes the entire www directory writable. Why can WordPress not
   write in it?
 * Is there a logfile that tells me WHY it cannot write? Otherwise, I’m stuck. What
   do I do now?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [thanatica2](https://wordpress.org/support/users/thanatica2/)
 * (@thanatica2)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/#post-3034584)
 * Note that I can edit permalink structure and edit theme css perfectly fine. This
   proves the directories are writable. So why can WordPress not update itself?
 *  Thread Starter [thanatica2](https://wordpress.org/support/users/thanatica2/)
 * (@thanatica2)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/#post-3034588)
 * Okay, I may have discovered something here.
 * This is in /wp-admin/includes/file.php :
 *     ```
       if ( ! $method && function_exists('getmyuid') && function_exists('fileo$
                       if ( !$context )
                               $context = WP_CONTENT_DIR;
                       $context = trailingslashit($context);
                       $temp_file_name = $context . 'temp-write-test-' . time();
                       $temp_handle = @fopen($temp_file_name, 'w');
                       if ( $temp_handle ) {
                               if ( getmyuid() == @fileowner($temp_file_name) )
                                       $method = 'direct';
                               @fclose($temp_handle);
                               @unlink($temp_file_name);
                       }
               }
       ```
   
 * This is wrong, because the script check whether the newly-created tempfile is
   owned by the user that apache is running as. This will never happen in my scenario.
 * Why does a newly-created file need to be owned by the user apache is running 
   as? I don’t want or need that, and neither does WordPress. By creating a file(
   and having it succeed) write-access is proven to be in order. No need to see 
   who owns the file.
 * Can this please be fixed?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/#post-3034590)
 * > Doesn’t work, it asks for FTP settings, but I don’t use FTP
 * You can [add your FTP details to your wp-config.php](http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants).
   FWIW, this is a server configuration issue – not a WordPress one.
 *  Thread Starter [thanatica2](https://wordpress.org/support/users/thanatica2/)
 * (@thanatica2)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/#post-3034592)
 * You’re missing the point. Using FTP or not has nothing to do with it.
 * The issue is that WordPress thinks the directories are not writable, but they
   are. This IS a WordPress issue, iyam.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Directory not writable?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [thanatica2](https://wordpress.org/support/users/thanatica2/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/direcotry-not-writable/#post-3034592)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
