From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <015437c5cbd6fb516d4790f311e93848@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] Newbie question Date: Wed, 23 May 2007 14:41:12 -0400 From: Sape Mullender In-Reply-To: <60f9bc7bde21dfaf422f2e6c3696bfad@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 7143a340-ead2-11e9-9d60-3106f5b1d025 >> 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 /: >> '/' 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