I’m not sure if my approach is good in this situation, but this is i’ve found and could implement.
I’m trying to customize firefox in disposable VM. I’ve taken the idea from this thread: [link]. I’ve created a
policies.json file for firefox. I’ve created a gitlab repo to store the file, and made an entry in the AppVM’s
/rw/config/rc.local file to download and copy to the right place the json file every startup. This is working fine. I even wanted to add some host entries to
/etc/hosts from various github repos, like stevenblack hosts. I’ve added some wget commands to download the host files into the rc.local file, merged them into 1 file, and i wanted to copy the contents of this file to the
/etc/hosts file. Unfortunately the copy of the contents to
/etc/hosts does not happen, beause it has no permission to do it. This is how it looks in the rc.local file:
##Copy stuffs to /etc/hosts
mkdir /tmp/hosts && wget -P /tmp/hosts/ -L github.raw.urls.of.the.host.files
cat /tmp/hosts/downloaded_host_file >> /tmp/hosts/hosts_4_dispVM
sudo cat /tmp/hosts/hosts_4_dispVM >> /etc/hosts
And the last command is not good. I’ve tried it out in a dispVM, and it can’t copy to
/etc/hosts because of permissions problem. I was able to copy the contents to /etc/hosts if i changed to root user with
sudo -i command.
Maybe my approach is not the best, but i hope someone can help me how to resolve the copy issues to /
Thanks any help!