Not able to edit core-site.xml file

Jitendra7337 1 Reputation point
2020-07-02T19:18:07.353+00:00

Hello,

I am using free version of azure.i am trying to add some entry in core-site.xml for HDInsight configuration Which is at location /etc/hadoop/conf location.

But,that file is read-only.how i can change permissions of that file So that i can write to it?

Thanks

Azure HDInsight
Azure HDInsight
An Azure managed cluster service for open-source analytics.
207 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,586 Reputation points Microsoft Employee
    2020-07-03T07:52:04.577+00:00

    Hello @Jitendra7337-8043,

    You need to use root permissions to edit file under /etc folder.

    Syntax:

    sudo <Favorite Editor > core-site.xml

    Error: Gives error message as “you don’t have permissions to edit the file”.

     cd /etc/hadoop/conf
     nano core-site.xml 
    

    Success: Allows to edit the file.

     cd /etc/hadoop/conf
     sudo nano core-site.xml 
    

    Hope this helps. Do let us know if you any further queries.


    Do click on "Accept Answer" and Upvote on the post that helps you, this can be beneficial to other community members.