简体   繁体   中英

Amazon EC2 instance installed apache as root, not ec2-user

I am new to EC2. I have created an instance with Amazon Linux AMI x86_64 EBS and installed an Apache web server.

Now issue is that everything seems to have installed under root and I can't edit any config files as ec2-user (eg /etc/httpd/conf/httpd.conf).

How can I fix this?

I have only used Ubuntu images on EC2, not the Amazon-supplied ones, but I think this is probably fairly standard. Use sudo for each command (or sudo -s to get a shell as root, if you need to do a whole bunch of things as root).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM