开发者

Login as www-data on Debian

I have a Debian Lenny server running Apache 2.2. I run PHP using Apache's fcgi mod. PHP runs as user www-data (the default) because it's what Apache runs as and there is only one site on the server so I don't see any reason (feel free to correct me) to have the FastCGI instance run as a different user.

I chown the ownership o开发者_运维问答f all my PHP files to www-data:www-data so that PHP has no problem modifying and writing data as needed (everything is chmod 755).

I recently got a new text editor I want to use to edit PHP on my desktop that will download files via SFTP and re-upload them when I hit save (transparently w/o me noticing). I use Vim server-side but for complex edits this seems easier.

My new desktop editor needs to log in as user www-data so it can write files onto the server. I have tried to passwd www-data setting up a password (and removing the "!" from /etc/shadow) but I am still unable to log in via SSH. What else do I need to do to be able to log in as user www-data?

Thanks.


Nevermind,

That's all you need to do!

I forgot to reload my ssh server because I restrict who can log in.

Hope the above is useful to someone!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜