Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I bought a load balancer that runs the application on of FreeBSD. I found the configuration file that has all the settings and login information for both the admin and read-only users. I logged in as the root user, but when I try to alter any files using vi (the only editor installed) I get a read-only filesystem error. I tried chmod 777 file, and when I do ls -l I can see that root has read, write, and execute privileges, but it still won't let me write to the file. What do I need to do to make this file writable?

share|improve this question

migrated from serverfault.com Feb 20 '13 at 20:31

This question came from our site for system and network administrators.

This question is kinda vague, but it sounds like you are confusing read only file permissions with a read only file system, as mschuett implies in the answer below. – Adam Feb 20 '13 at 20:38
You should get the documentation for the load balancer and use it with the correct interface. Trying to change things on the underlying FreeBSD layer can have disastrous effects and at the very least it will not behave as you expect. In all ways you should ignore FreeBSD as much as possible. – bahamat Feb 20 '13 at 22:07
It's impossible to answer this without knowing how the appliance is set up. Do you have a model number? What is the filesystem layout: post the output of mount. Where is the file you're editing located? – Gilles Feb 21 '13 at 0:59

It's not that the file isn't writable; the filesystem itself is mounted read-only. Use mount to check the mount options and mount -u -o rw <mount_point> to remount the filesystem writable.

share|improve this answer

When FreeBSD boot in single-user mode, it mounts only / filesystem and mounts it in read-only mode. To access all filesystems, you should remount / in read-write mode and mount other filesystems (if any).

Screenshot from 8.4-RELEASE box:enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.