开发者

Gaining root access on ec2

I am trying to write to my /var/www/ folder on my apache server that I setup on EC2. All of the permissions are set to the 'root' user, but amazon only lets you login to their AMI as 'ec2-user'.

I am using WinSCP. I logged in as ec2-user using ssh, and executed sudo su, so I can gain root access that way. But how do I go about having that same access through my S开发者_JAVA百科FTP (WinSCP) as well as through putty?

Thanks!


When you SSH in, you can su to the root user whenever necessary.

As far as FTP and SCP, it sounds like you want to make your www folder owned by the user you're going to log in as, rather than root.

It's your server, you control all the permissions, and can create as many users as you want.


Add ec2-user to the group of user which owns your Document root (group to which your apache user belongs to) Now you can safely WinSCP or SFTP.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜