开发者

php server web user setup

I'm needing to setup a basic web user account on my ubuntu 10.10 server to host web pages. This account should be limited to access only the necessary directories on the machine. I setup the following account but nothing happens when I try to log into it:

 :~$ groupadd -g 1005 webgroup
 //I then changed the group and permissions of a current user I had already created
 :~$ sudo usermod -g 1005 -s /bin/false -d /home/webuser/ webuser

When trying to login using this account I enter the username [webuser] and the password but it just redirects me back to the login: prompt.开发者_C百科 I tried resetting the password but still have the same problem.

Can someone either tell me what I'm doing wrong, or suggest another method that would achieve the same result (if not a better one).


I've found two important things to be true:

1st: I'm being redirected to the login prompt because /bin/false is not a valid shell therefore no bash/sh commands can be executed and an immediate logout is forced.

2nd: upon installing apache2 a user was already created named www-data with the permissions I was looking for. I was under the impression that a user had to be constantly logged into the machine for web requests to be handled. This is not the case (as it is with windows OS's). Therefore, letting the default www-data user handle all requests is the correct method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜