Closed
Description
opened on Sep 20, 2013
As part of my test setup, the setup script needs to append a line to /etc/hosts
Doing sudo echo "127.0.0.1 foo.bar" >> /etc/hosts
results in the following error when executed inside a container
/bin/sh: /etc/hosts: Read-only file system
Googled the error and based on a suggestion from superuser.com issued the command sudo -- sh -c "echo test >> /etc/hosts"
. But it results in the same error
vi /etc/hosts
opens the file in read-only mode. Changing permission doesn't work as well.
bash-3.2# chmod a+w /etc/hosts
chmod: changing permissions of `/etc/hosts': Read-only file system
Any suggestions?
Metadata
Assignees
Labels
No labels
Activity