WordPress.org

Support

Support » Installation » [Resolved] WP asks for FTP despite 777 permissions

[Resolved] WP asks for FTP despite 777 permissions

  • I set all my files to permission 777 and it still asks for FTP info. How can I allow wordpress to directly access the files? php runs as www-data and the files are stephen:www-data, and because of the group permissions, php should be able to have full access…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The reason it’s asking for FTP credentials is not because of permissions. WordPress will ask for FTP credentials whenever the current apache user and the folder owner do not match. It actually creates a temporary file to test this. You need to change ownership all folders in your WP installation to ‘www-data’ using the # chown command.

    I believe this was implemented as a security feature 🙂

    The main problem is that whenever I ftp files, it will cause the problem again because I don’t log in as ftp as www-data.

    Normal hosts don’t have this problem, how do they do it? Do they have files uploaded as www-data regardless of the login that was used?

    Some good information in this article: Permission Scheme for WordPress

    I don’t get it, that page recommends having all the files owned by the user. Wouldn’t that cause the original problem?

    Have you tried the solution I posted? This is not a permissions issue as proven by setting all files (and folders) to ‘777’. I just noticed you stated ‘files’ in your original post. Did you change folder permissions as well?

    If you are interested in understanding the solution here is an external post http://www.chrisabernethy.com/why-wordpress-asks-connection-info/

    Ah, so unless I am reinstalling wordpress or wiping the whole install, it should stay solved?

    Yes. That should permanently fix the issue 🙂

    Oh, and when you get it working be sure to change your file/folder permissions to something more secure than ‘777’ 🙂

    Yes, that’s the plan 🙂 Had 660 before for files and 770 for folders.

    @keith Driscoll is right in that it isn’t so much a numeric permissions issue as it is an ownership issue in this case.

    If it’s a localhost installation just for development and not exposed to the WAN, you’ll be fine, but if this is a live site, you may really want to consider whether or not having all of your files owned and writable by the web server user is something you really want to do.

    It might be worth doing some additional investigation. Just a suggestion, mind you.. you’re free to do as you like of course. 🙂

    I set all my files to permission 777 and it still asks for FTP info. How can I allow wordpress to directly access the files?

    A little more in depth discussion on that topic, if you’re interested.
    WordPress Filesystem Abstraction FAQ

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] WP asks for FTP despite 777 permissions’ is closed to new replies.
Skip to toolbar