[wp-trac] [WordPress Trac] #7779: Automatic upgrade doesn't detect the effective uid correctly.

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 22 16:06:10 GMT 2008


#7779: Automatic upgrade doesn't detect the effective uid correctly.
----------------------------+-----------------------------------------------
 Reporter:  jamuraa         |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:           
Component:  Administration  |     Version:  2.6.1    
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 When trying to upgrade a plugin automatically, the system attempts to
 detect if it can create files, and fails because it is using getmyuid() to
 try to find out the effective user ID.  getmyuid() returns the owner of
 the file that is currently being executed, not the user ID executing it.
 This means if you are running php in a fcgi process (as root, nobody, or
 any other user other than the owner of index.php), it fails to recognize
 that it can actually create and delete files.

 The patch below used posix_getuid() which returns the actual UID of the
 process running, and allows automatic upgrades to happen normally on my
 system.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7779>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list