Automatic plugin upgrade doesn't detect the effective uid correctly.
|Reported by:||jamuraa||Owned by:||DD32|
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.
Change History (12)
- Summary changed from Automatic upgrade doesn't detect the effective uid correctly. to Automatic plugin upgrade doesn't detect the effective uid correctly.