distutils:permissions problems

  • Thread starter Eric S. Johansson
  • Start date
E

Eric S. Johansson

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
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Eric said:
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
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Eric said:
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
 
E

Eric S. Johansson

Martin said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top