In my experience, WordPress can be a bit fussy about permissions and ownership when it comes to self-update without FTP, so using FTP to localhost is a perfectly valid tactic, I'd say. But as others have said, just ensuring that everything from your WordPress root directory on downwards is writable by the PHP process, and owned by the same user, may well be enough to avoid the need for FTP.
If you do want to use FTP, are you sure you've enabled the FTP server? If so, you should just use a user who has permission to get to the directory via FTP (you can test with the command-line ftp tool.) As my sites are set up in my personal Sites
directory, I just use my normal username and password (e.g. for /Users/matt/Sites/whatever
I log in as matt
.)
Other things to check: What happens if you try ftp localhost
on the command line? Can you log in there?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…