[wp-hackers] Installing themes, plugins without FTP credentials
cross at thisismyurl.com
Wed Mar 23 21:31:12 UTC 2011
Scot, it looks like you're already well versed on solving this but just as note from my own experiences I couldn't install plugins/themes on a server for the longest time without FTP credentials. It turned out that the WordPress install on the server was not the same user as the server, despite every indication to the contrary in Linux.
I ran <?php echo exec('whoami'); ?> in the functions.php file of my site and it returned a different user than appeared as the owner from a command line. I simply changed ownership of the directory to match what WP thought it was and the problems went away.
What I suspect is that during an update from the browser, either the core or a plugin altered the ownership settings while unarchiving. But, on 100's of servers I've only encountered it on a Nginx and have been unable to reproduce the result consistently so it could just as easily have been a freak anonymity related to the server build.
>> On Mar 23, 2011, at 2:33 PM, Scot Hacker <shacker at birdhouse.org> wrote:
>>> From all the reading I've done, WP's themes and plugins installers will either:
>>> 1) Work without FTP credentials if the directories are writable by the web server process
>>> 2) Prompt for FTP credentials
>>> On my server, apache runs as nobody. So:
>>> chown -R nobody:nobody wp-content/themes
>>> chmod g+w wp-content/themes
>>> Still prompts for FTP credentials. For testing, I open it up all the way (which I don't like to do):
>>> drwxrwxrwx 6 nobody nobody 4096 Mar 21 12:00 themes/
>>> but it still doesn't work. Making sure the installer scripts themselves are owned by nobody:
>>> # ls -l wp-admin/theme-install.php
>>> -rw-r--r-- 1 nobody nobody 3355 Feb 25 13:27 wp-admin/theme-install.php
>>> So... why do I still get prompted for FTP credentials? Using WP 3.1.
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Online Portfolio - http://christopherross.ca
Personal Blog - http://thisismyurl.com
Fredericton - 506.238.4661
San Diego - 858.201.4912
More information about the wp-hackers