Re: [9fans] Newbie question



I'm a newbie in Plan 9.
My problem is that I need to copy some files to the root ("/")
directory, but when I try that, the system returns:

cp can't create /<filename>:
'/<filename>' mounted directory forbids creation

I know (or better, I think) it's a permission problem,
so how can I do to write in that directory?

Thanks to everybody in advance.

Plan 9 allows mounting multiple file systems at the same mount point,
one before or after the other. If you have multiple file systems
mounted on, say, '/', then, when you create a file or directory
in '/', something has to tell the system in which of the mounted file
systems this file should be created. Hence the -c flag on mount and bind.
mount -c /srv/x mountpoint
of
bind -c dir mountpoint
says that this is the file system in which new files should be created.
Needless to say, you can only do one -c mount or bind per mountpoint.

I bet your root file system isn't mounted with the -c flag.

Sape

Following up on my own mail after a little discussion in the Unix room,
we asked
1. Why would you want to create a file in the root directory in the first place?
it's probably not a good place.
2. The standard boot script mounts the root directory without -c. You can, if
you insist, remount the root file system. But note point 1 above :-)


Sape

.



Relevant Pages

  • Re: UFS Bug: FreeBSD 6.1/6.2/7.0: MOKB-08-11-2006, CVE-2006-5824, MOKB-03
    ... They can simply mount a filesystem with any number of SUID ... root binaries on it and have their way with the box. ... They have physical access to the machine. ...
    (FreeBSD-Security)
  • 2.6 kernel NFS root mount problem
    ... I'm tying to run 2.6.18 kernel on ARM AT91RM9200DK board with NFS mount ... usb usb1: Product: AT91 OHCI ... Unable to mount root fs via NFS, ...
    (Linux-Kernel)
  • NFS root mount problem
    ... I'm tying to run 2.6.18 kernel on ARM AT91RM9200DK board with NFS mount ... usb usb1: Product: AT91 OHCI ... Unable to mount root fs via NFS, ...
    (Linux-Kernel)
  • Re: nfs help?
    ... If you use root on client to mount an export, ... NFS, the original ownership is maintained, but numerically: ...
    (Fedora)
  • Re: [RFC PATCH 1/8] share/private/slave a subtree
    ... > The reason why I implemented that way, is to less confuse the user and ... > a vfsmount if the dentry is not a mountpoint. ... property of a mount). ... just by doing the 'bind dir dir' and then doing 'make-shared dir'. ...
    (Linux-Kernel)