Routing and DNS setting

Trying to use example in legato documentation for interface settings : https://docs.legato.io/16_10/c_mdcDataSessions.html

No way to write in file /etc/resolv.conf having permission denied error.

I did add /etc/resolv.conf in the requires/file section in the adef of the project .

Only solution was to set sandboxed option to false.

What was wrong?

Is there a best way to change the routing than having a system call?

Regards

Hi there,

By default, /etc/resolv.conf is system file with access right:
““root@swi-mdm9x28-ar758x:~# ls -lrt /etc/resolv.conf
-rw-r–r-- 1 root root 50 Jan 2 1970 /etc/resolv.conf””
By adding /etc/resolv.conf in the requires/file section in the .adef, this file will get the same access right.
So you can’t modified make sense, and the only way to use is unsandbox to access system files. Please note that unsandbox may bring up the security concerns.

Thanks."