hi again,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Let me clarify what I am doing and what is my approach till now.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We have a portal using which users use our compute resources.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In zope we use NIS authentication for validating a user.We have many things that requires root/logged in user privledeges.One example is of a &#39;file system explorer&#39;.In this I have used ZFSpath product.This explorer is used by users to navigate through their home areas and select what ever file they want.As of now I have changed some functions of ZFSpath class which I was using so that they can be executed as the logged in user(since zope does not have rwx permissions on other user&#39;s directory).This is just one case.Hope I have cleared myself well.<br>
<br><div class="gmail_quote">On Wed, Apr 9, 2008 at 11:44 PM, Dieter Maurer &lt;<a href="mailto:dieter@handshake.de">dieter@handshake.de</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
rishi pathak wrote at 2008-4-8 18:03 +0530:<br>
<div class="Ih2E3d">&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I dont have a need to run all the external method as root, only<br>
&gt;some of them.<br>
<br>
</div>I did understand this *BUT* you do not have a choice.<br>
<br>
 &nbsp;While a single ExternalMethod runs as &quot;root&quot;, the complete<br>
 &nbsp;Zope process runs as root -- and this applies to all<br>
 &nbsp;requests which are run in parallel with your ExternalMethod.<br>
<br>
Please reread my former message.<br>
<br>
If you have touble to understand the terms &quot;thread&quot; and/or &quot;process&quot;,<br>
consult Wikipedia to get some insight.<br>
<br>
&gt; ...<br>
<div><div></div><div class="Wj3C7c">&gt;On Tue, Apr 8, 2008 at 12:50 AM, Dieter Maurer &lt;<a href="mailto:dieter@handshake.de">dieter@handshake.de</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; rishi pathak wrote at 2008-4-7 17:46 +0530:<br>
&gt;&gt; &gt;There is a requirement for running some external methods as super user.<br>
&gt;&gt; &gt;For this I thought of adding a new parameter.If set the code would be<br>
&gt;&gt; &gt;executed with effective uid of root.<br>
&gt;&gt;<br>
&gt;&gt; This is extremely dangerous.<br>
&gt;&gt;<br>
&gt;&gt; To run code as super user, you need to change the effective user id.<br>
&gt;&gt; Changing the effective user id affects the whole process -- not just<br>
&gt;&gt; the thread executing your external method.<br>
&gt;&gt; These things are very difficult to handle in a multi threaded environment,<br>
&gt;&gt; in general.<br>
&gt;&gt; Moreover, running internet driven code uncontrolled as super user<br>
&gt;&gt; is likely to be a big security risk.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Let your application write some command to a queue and process<br>
&gt;&gt; the queue asynchronously. The processing can be performed as<br>
&gt;&gt; super user.<br>
&gt;&gt;<br>
&gt;&gt; If this is not possible, let your application communicate<br>
&gt;&gt; with another process which runs as super user -- and pass on<br>
&gt;&gt; synchronous commands from your application to this process.<br>
&gt;&gt;<br>
&gt;&gt; In both cases, it is ensured that only the restricted command<br>
&gt;&gt; set can be used to run something as super user -- and<br>
&gt;&gt; not some arbitrary code....<br>
<br>
<br>
<br>
--<br>
Dieter<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards--<br>Rishi Pathak<br>