good morning, everybody
i know, it seems more to be a problem according to unix but i got it while
developing software with php:
i have 2 different users on a hp-ux machine that execute php scripts. they
are both in the same group.
these php scripts start background processes, i can communicate with using
signals (sending with posix_kill, starting background processes via
pcntl_fork).
so i got severel background processes owned by my 2 users.
the problem is i want to send signals as one of my 2 users to all my php
background processes no matter who of my 2 users is the owner. is it
possible other than using external tools like sudo?
i'm using:
PHP 4.3.4 (cgi) (built: Aug 18 2004 15:37:46)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
compiled with:
../configure' '--prefix=/usr/local/php-cgi-saprfc' '--enable-calendar'
'--enable-filepro' '--with-gd' '--with-jpeg-dir=/usr/local'
'--with-zlib-dir=/usr/local' '--without-mysql' '--enable-sysvsem'
'--enable-sysvshm' '--with-pgsql=/usr/local/pgsql' '--enable-trans-sid'
'--with-cpdflib=/usr/local' '--enable-sockets' '--with-ncurses=/usr/local'
'--disable-shared' '--with-tsrm-pthreads' '--with-saprfc=/usr/local/rfcsdk'
'--enable-pcntl
thanks
rolf 1 1682
rs035 wrote: i have 2 different users on a hp-ux machine that execute php scripts. they are both in the same group. these php scripts start background processes, i can communicate with using signals (sending with posix_kill, starting background processes via pcntl_fork). so i got severel background processes owned by my 2 users. the problem is i want to send signals as one of my 2 users to all my php background processes no matter who of my 2 users is the owner. is it possible other than using external tools like sudo?
Sort of, but you really should understand the security model of Unix before
you start stretching the rules.
The only obvious solution I see within the constraints you've specified
would be to put the two users into their own group, then setup a program to
run setuid as the other user but only executable by the isolated group.
e.g.:
-rwsr-xr-- userA php_script_grou p signal_as_userA
-rwsr-xr-- userB php_script_grou p signal_as_userB
HTH
C. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Behrang Dadsetan |
last post by:
Hi all,
please note that once I finished writing the script someone explained me
that there is a command pwait under Solaris... anyway it was fun to
write and it did not take long (while I am not a python guru..). And my
version is MUUUCH better :)
Is there no standard interfaces to the process table? I only found
examples of how to do it on the win32 platform. So I parse with re the
|
by: Sori Schwimmer |
last post by:
Hi,
I am working on an application which involves
interprocess communication. More to the point,
processes should be able to notify other processes
about certain situations, so the "notifyees" would be
able to act in certain ways.
As processes are distributed on several machines, in
different physical locations, my thinking was:
|
by: bill |
last post by:
This is not strictly a C question, but groups such as comp.unix.wizards
seem to have died. Does anyone know the appropriate group for this
question?
I want to signal an upstream process. eg:
% a | b | c | d
and d wants to send a signal to a.
The problem is: how does d get a's pid. I see 4 solutions:
|
by: Arnaud Debaene |
last post by:
Hello all.
I've got a bunch of existing, non managed, C++ DLLs that export types
with, among other things, public events implemented using the
boost::signals library.
Now, I need to have these DLL interoperate with managed code. Among
others things, the managed code need to be able to register for
notification with the boost signals. I've tried different approaches
(trying to register a pinned delegate with the boost::signal, etc...),
|
by: Jean-Guillaume LALANNE |
last post by:
Hi,
I am pretty new to the postgresql community.
My question may seem a little bit strange but
I'd like to know if it is possible to run 2
postgresql processes with 2 separate databases on the
same machine (change of the ports, different paths to
logs, ...)?
Thanks in advance for your answers.
| |
by: s99999999s2003 |
last post by:
hi
i have a program that works very similar to tail -f in Unix
It will need a Ctrl-C in order to break out of the program.
I wish to run this program using python (either thru os.system() or
some other subprocess modules) and how can i pass Ctrl-C to this
program to terminate it in python?
thanks
|
by: Mitko Haralanov |
last post by:
Hi everyone,
First off, I know that this has been discussed before and I did a
search but could not find anything that helped my situation.
Here is the problem: I have a Python program that uses threads, forked
processes, and signals and I can't seem to understand where the signals
go.
When the program starts, it creates a thread, which spins in select
|
by: Daniel Clark |
last post by:
I have a Windows command line based application that only shuts down
cleanly if it sees "CTRL-C" on the console. I need to automate the
running of this application, but still allow the user sitting at the
machine to cancel the process cleanly if he/she needs to. In Unix this
would be a tiny shell script that used "kill -15", but under Windows
there does not seem to be an easy way to do this, at least that I can
find.
Below is a test...
|
by: Bill Nguyen |
last post by:
I ran into this problem in a Terminal Server environment
When trying to kill all processes having the same name (to avoid hanging
instances of this process), my users ran into permission problem (access
denied) because the routine tried to kill other users' process as well.
Is there away to idenfity process owner in a Terminal server environment so
that only user's own processes to be eliminated?
Thanks
|
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...
|
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,...
| |
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |