[wp-testers] Problems with autoupdate and plugin installer

Peter Westwood peter.westwood at ftwr.co.uk
Sat Nov 29 23:22:27 GMT 2008


bosmail at gmail.com wrote:
> I'm using servage.net hosting and I'm having problems with auto updater.
> I've found a workaround her:
> http://vanonet.com/2008/09/servage-wordpress-plugin-autoupgrade-problem/
>
> By changing the below string in wp-admin/include/file.php
>
>
>     if ( getmyuid() == fileowner($temp_file) )
>
> to
>
>     if ( posix_getuid() == fileowner($temp_file) )
>
> I'm not aware of the exact consequences, if any, but it solved the problem
> in both 2.6.5 and 2.7-almost-rc-9965
>
> If the above string could be changed permanently it would be of great help
> to users with the same problem.
>   
Not sure thats wise.

getmyuid — Gets PHP script owner's UID
posix_getuid — Return the real user ID of the current process

The purpose of the code you have changed is to determine whether or not 
the updater can use direct file access to update the files whilst still 
keeping the permissions suitable for you to be able to access the files 
by ftp etc.

This is why we use getmyuid as that gets the owner of the files - i.e. you

Using posix_getuid probably gets the webserver user which means you 
don't own the files any more!

You should still be able to do the upgrades/installs using one of the 
ftp filesystem abstractions.

westi

-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5 



More information about the wp-testers mailing list