473,563 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

distutils:permi ssions 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 1587
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
2249
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 permissions for files it downloads to 640. When distutils installs that, and I try to use the application, things obviously go boom. Right now, I'll...
0
2073
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 Application Server) I downloaded the package (csv-1.0) and tried to install with python
0
1206
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 the current code with versions of Python from 1.5.2 to 2.3. A future Distutils 2.0 would then drop 1.5.2 compatibility. The README and related...
0
1070
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 build_ext Traceback (most recent call last): File "setup.py", line 16, in ? py_modules=,
0
1860
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 problems, at least the primes sample module shows a nice 25 to 30 fold speed increase over the pure python version. I used the distutils to...
0
922
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: install-scripts = /opt/mcad/bin But it would be very helpful if I could install some of the scripts in another location. Any good way to do...
7
1530
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 things can go horribly wrong if the user forgets. I would like to create a new default setting for this commandline option as well as a couple of...
1
3171
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). The README file in the Tools/freeze directory of the Python-2.4.4 distribution says the following (and many other things): Previous...
1
2552
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 reasons, but i have problems to have access to GPIO pins on the board to read and write on harware(pic, memories...) so i want to include into python a...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.