Version 4 by Chris Ridd
on Nov 07, 2017 06:18.

compared with
Current by Nahum Shalman
on Nov 07, 2017 14:01.

(show comment)
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View Page History
Lofs-mounted single files *can*, in fact, be written to, but due to the way they're mounted, you can't "create" them, so normal opens and writes (like from the {{vi}} editor, running the "passwd" command, or from shell ">" redirection) won't work.

This command will overwrite the logs-mounted lofs mounted {{/etc/shadow}} file with a (presumably edited) {{/tmp/shadow}} file, using the {{socat}} binary , which lets you specify the arguments to the open syscall:
{code}socat -u OPEN:/tmp/shadow,rdonly OPEN:/etc/shadow,wronly,trunc