473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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

Oct 9 '06 #1
3 1582
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
Oct 9 '06 #2
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

Oct 9 '06 #3
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
Oct 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: PenguinOfDoom | last post by:
For whatever reason, distutils does not change file permissions of stuff in data_files in core.setup and neither does it allow specifying these permissions. The CVS repository I am using assigns...
0
by: Alex Lapp | last post by:
Hi ng, i have a problem installing cvs module from: http://www.object-craft.com.au/projects/csv/ My Python version is: Python 2.1.3 (Not the latest, but i need this version for running Zope...
0
by: A.M. Kuchling | last post by:
I want to make a Distutils 1.1 release that wraps up the version of the code that was in Python 2.3. This would be the last 1.5.2-compatible release of Distutils, giving people the chance to use...
0
by: JiggaHertz | last post by:
I'm trying to build the python interface to fuse and this is my first time using python. I'm getting the following errors # python setup.py build running build running build_py running...
0
by: Maarten Sneep | last post by:
I'm trying to build PyBison on Mac OS X, and I'm running into some problems with the distutils. Just for starters: PyBison requires Pyrex. This is not a problem, and Pyrex seems to work without...
0
by: insyte | last post by:
Is there a recommended way to specify the permissions and ownership of scripts installed from distutils? Also, I'm currently just using this config in setup.cfg to control where the scripts go: ...
7
by: Eric S. Johansson | last post by:
is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? script installation directory but I don't want on the command line where...
1
by: jmalone | last post by:
I have a python script that I need to freeze on AIX 5.1 (customer has AIX and does not want to install Python). The python script is pretty simple (the only things it imports are sys and socket)....
1
by: Otacon22 | last post by:
Hi all, I want to create a robot with a router board based on processor atheros 2.6, called "fonera". I have installed a version of linux, Openwrt and python and i want to use it for some...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.