[9fans] Newbie question - Plan9

This is a discussion on [9fans] Newbie question - Plan9 ; Hi all, 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 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: [9fans] Newbie question

  1. [9fans] Newbie question

    Hi all,
    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.

  2. 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 /:
    > '/' 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


  3. Re: [9fans] Newbie question

    create it in /root rather than /. the 'ns' command will show you that
    /root is mounted at / very early on.

    On 5/23/07, Fabrizio Colalucci wrote:
    > Hi all,
    > 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.
    >


  4. 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 /:
    >> '/' 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


  5. Re: [9fans] Newbie question

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1


    On May 23, 2007, at 11:41 AM, Sape Mullender wrote:
    > 1. Why would you want to create a file in the root directory in the
    > first place?
    > it's probably not a good place.


    I had occasion to do this recently while porting to a new
    architecture. Infrequent, but confusing for the first 3 minutes.

    Paul

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.3 (Darwin)

    iD8DBQFGVIvnpJeHo/Fbu1wRAlLfAKCZK24+8aBf5tQIZuEGrWVxXzTDUACaAyTT
    PogCxE3XRHoqpVkc2KpEb/w=
    =LZiG
    -----END PGP SIGNATURE-----

  6. Re: [9fans] Newbie question

    On 5/23/07, Fabrizio Colalucci wrote:
    > Hi all,
    > 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:


    we're all wondering why you need /

    a bad idea in general

    what is the reason?

    thanks

    ron

  7. Re: [9fans] Newbie question

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    As I said - my first pass at power64 needed /power64.

    But this should be infrequent.

    Paul

    On May 23, 2007, at 11:49 AM, ron minnich wrote:

    > On 5/23/07, Fabrizio Colalucci wrote:
    >> Hi all,
    >> 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:

    >
    > we're all wondering why you need /
    >
    > a bad idea in general
    >
    > what is the reason?
    >
    > thanks
    >
    > ron


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.3 (Darwin)

    iD8DBQFGVI7xpJeHo/Fbu1wRAhc+AJ9VGdtjJ9u034e6we+NixmsQWtFKQCdE4vb
    5Qyf/V3dF3NnKOageC2pTYQ=
    =Hide
    -----END PGP SIGNATURE-----

  8. Re: [9fans] Newbie question

    On 5/23/07, Paul Lalonde wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > As I said - my first pass at power64 needed /power64.
    >


    I was wondering about fabrizio, not paul :-)

    thanks

    ron

  9. Re: [9fans] Newbie question

    2007/5/23, Sape Mullender :

    >
    > 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.
    >
    >
    > Sape


    I know it isn't a good place, but I have to install the Plan B OS:

    http://plan9.escet.urjc.es/ls/planb.html

    and so I need to unpack a tar ball with a set of files on top of a
    Plan 9 installation.

+ Reply to Thread