Skip to content

unlock – Can’t make any change of hosts file on Mac OS ventura

  • by

Ask for support!

I plan to add some records into hosts file under /etc/hosts. but when I try to change the file, I got error. unable to write a readonly file.

I even use the root account to try to change it, still failed. below is the file

sh-3.2# id
uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),703(,702(,33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(,398(,399(,400(,701(
sh-3.2# ls -l /etc/hosts
-rw-r--r--  1 root  wheel  688 10 25 08:19 /etc/hosts

I try to change the permission of this file, still failed.

sh-3.2# chmod 777 hosts
chmod: Unable to change file mode on hosts: Operation not permitted

and after I disable SIP, still failed.

However when I try to change other files in same folder(/etc), will work. only hosts file didn’t work.

anyone can help me? great thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *