473,698 Members | 1,877 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 1596
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
2254
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 probably have to resort to an os.chmod call in the setup script. Shouldn't data_files be more...
0
2093
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
1213
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 bits have been updated, and I've made a snapshot release that can be downloaded from...
0
1074
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
1873
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 create the module from the primes.pyx sample, following the setup.py from the PyBison distrubution:
0
928
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 that?
7
1534
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 other such as the data default directory. --- eric
1
3181
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 versions of Freeze used a pretty simple-minded algorithm to
1
2563
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 porting of io.h I founded an already python wrapped version of io.h called ioport.c that i found...
0
8672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9155
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8890
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5859
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
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
2
2322
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.