Hey everybody, I am just newbie at Python. I wanted to write a script in Python to change DNS. 

But I learned that resolv.conf is ***read-only*** file, after writing that code. Because I took that error: **IOError: [Errno 13] Permission denied: '/etc/resolv.conf'**

```
myFile= open("/etc/resolv.conf", "w")

```

Then, I made a little search and found `os.chmode()` and I wrote a new line to remove all privileges of ***resolv.conf*** which is:

```
os.chmod("/etc/resolv.conf", 0777)

```

But now I'm taking that error: **IOError: [Errno 13] Permission denied: '/etc/resolv.conf'**

I can't get over this question and I'm waiting for your advices.

Thank you.