distutils:permissions problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric S. Johansson

    #1

    distutils:permissions problems

    I'm developing Python code on multiple VM Ware guest OS running ubuntu.
    I need to share common file space so that each of these guest
    instances will have complete access to the to all of the files.

    The problem is that, because of a quirk (or misfeature) of VM Ware
    shared filesystem, all of the directories and files are owned by root
    with a 700 permissions. When I run setup.py install, they are installed
    as root with 700 permissions. How can I alter the behavior of distutils
    so that my modules could be installed with a more useful user and
    permissions?


    many thanks

    ---eric

  • Martin v. Löwis

    #2
    Re: distutils:permi ssions problems

    Eric S. Johansson schrieb:
    The problem is that, because of a quirk (or misfeature) of VM Ware
    shared filesystem, all of the directories and files are owned by root
    with a 700 permissions. When I run setup.py install, they are installed
    as root with 700 permissions. How can I alter the behavior of distutils
    so that my modules could be installed with a more useful user and
    permissions?
    I recommend to change the permissions after the files have been
    installed. If you absolutely have to change setup.py, you should inherit
    from the install_lib and install_scripts commands, and either override
    the "install" method to install using a different umask, or you should
    look at the get_outputs() result of the command, and modify the files
    after they got installed.

    You might also try changing your umask.

    Regards,
    Martin

    Comment

    • Martin v. Löwis

      #3
      Re: distutils:permi ssions problems

      Eric S. Johansson schrieb:
      The problem is that, because of a quirk (or misfeature) of VM Ware
      shared filesystem, all of the directories and files are owned by root
      with a 700 permissions. When I run setup.py install, they are installed
      as root with 700 permissions. How can I alter the behavior of distutils
      so that my modules could be installed with a more useful user and
      permissions?
      I recommend to change the permissions after the files have been
      installed. If you absolutely have to change setup.py, you should inherit
      from the install_lib and install_scripts commands, and either override
      the "install" method to install using a different umask, or you should
      look at the get_outputs() result of the command, and modify the files
      after they got installed.

      You might also try changing your umask.

      Regards,
      Martin

      Comment

      • Eric S. Johansson

        #4
        Re: distutils:permi ssions problems

        Martin v. Löwis wrote:
        Eric S. Johansson schrieb:
        >The problem is that, because of a quirk (or misfeature) of VM Ware
        >shared filesystem, all of the directories and files are owned by root
        >with a 700 permissions. When I run setup.py install, they are installed
        >as root with 700 permissions. How can I alter the behavior of distutils
        >so that my modules could be installed with a more useful user and
        >permissions?
        >
        I recommend to change the permissions after the files have been
        installed. If you absolutely have to change setup.py, you should inherit
        from the install_lib and install_scripts commands, and either override
        the "install" method to install using a different umask, or you should
        look at the get_outputs() result of the command, and modify the files
        after they got installed.
        >
        You might also try changing your umask.
        thank you for your kind reply. I have already tried changing umask.
        The vmware filesystem has its own interpretation of permissions and
        access which bears absolutely no resemblance to either the UNIX or the
        NT models. It feeds false data into the system and well, we get to have
        this conversation. :-)

        I'm currently changing permissions afterwards and that's a source of
        installation breakage because the same information is stored in multiple
        places. I might be able to unify things if I can figure out how to make
        all components reference everything in a setup.cfg file.

        your suggestion about modifications isn't all that horrible because I'm
        already doing a significant amount of work that isn't covered by the
        distutils code as documented. thank you for the pointers to additional
        functionality that might be useful to me.

        ---eric
        >
        Regards,
        Martin
        >

        Comment

        Working...