Unable to create a file in Linux EC2 instance

Discussion in 'Cloud Computing' started by _45553, Dec 18, 2018.

  1. _45553

    _45553 Member

    Joined:
    Oct 27, 2018
    Messages:
    10
    Likes Received:
    1
    Hi
    I am trying to create an html file in the EC2 instance created using Amazon Linux AMI. But getting the below error.
    "index.html" E212: Can't open file for writing"

    Steps followed
    1. AMI - Amazon Linux AMI
    2. Instance Type - t2.micro
    3. Availability zone - ap-southeast-2b
    4. Post launching the instance successfully using Putty, configured as webserver using yum install httpd -y
    5. When trying to create an index.html getting the above error listed.
    e212.JPG
    Any help in this regards would be much appreciated.

    Regards,
    Pugalenthi V.
     
    #1
  2. _45553

    _45553 Member

    Joined:
    Oct 27, 2018
    Messages:
    10
    Likes Received:
    1
    I found the problem. I wasn't working from root.

    SUDO SU -
    The above command solved the above issue.
    Thanks.
     
    #2

Share This Page