<div>In fact I&#39;m in the same situation as Peter on one of my wikis (the one that was compromised in the first place). &nbsp;On the commercial webhost I use the only interaction is using cpanel. &nbsp; I can set permissions but ony the basic ones, not using setgid. I&#39;m going to discuss this with them, as well as Rogutes&#39; points above.</div>
<div><br></div><div>(Also with cpanel you can&#39;t see the date last modified nor the group and user who own the file/directory - my host agrees it&#39;s not good enough, and they&#39;re going to discuss it with the cpanel makers! If they do, that&#39;s what I call service! I don&#39;t think you&#39;d get that from 1&amp;1.)</div>
<div><br></div><div>Do any hosts offer better? &nbsp;At work (University of Manchester), I can connect using ssh, and can give full unix line commands. &nbsp;</div><div><br></div><div>James</div><div><br></div><div>ps It would be useful to keep a list of pmwiki-friendly hosts on the pmwiki site, with the pros and cons of each. &nbsp;As and when users encounter them - it wouldn&#39;t need to be systematic.</div>
<div><br></div><div>pps Luigi&#39;s right - I think you should be able to chmod with ftp clients - see here for example</div><div><a href="http://www.phpjunkyard.com/ftp-chmod-tutorial.php">http://www.phpjunkyard.com/ftp-chmod-tutorial.php</a><br>
</div><div><br></div><br><div class="gmail_quote">On Tue, Dec 23, 2008 at 9:24 AM, PKHG <span dir="ltr">&lt;<a href="mailto:p.k.h.gragert@misc.utwente.nl">p.k.h.gragert@misc.utwente.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">









<div lang="NL" link="blue" vlink="purple">

<div>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Hallo,</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Using an FTP-client for changing protection codes, I do not have
the possibility to set the guid bit (I mean chmod 2777) ?!</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">And (my) ftp direct does not have a chmod at all?</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">So that 'trick' is not possible for everybody?</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Greetings</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Peter</span></p>

<p><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">&nbsp;</span></p>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">

<p><b><span style="font-size:10.0pt">Van:</span></b><span style="font-size:10.0pt"> <a href="mailto:pmwiki-users-bounces@pmichaud.com" target="_blank">pmwiki-users-bounces@pmichaud.com</a>
[mailto:<a href="mailto:pmwiki-users-bounces@pmichaud.com" target="_blank">pmwiki-users-bounces@pmichaud.com</a>] <b>Namens </b>James M<br>
<b>Verzonden:</b> dinsdag 23 december 2008 1:39<br>
<b>CC:</b> <a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<b>Onderwerp:</b> Re: [pmwiki-users] Security breach?</span></p>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<div>

<p>On Mon, Dec 22, 2008 at 11:53 PM, DaveG &lt;<a href="mailto:pmwiki@solidgone.com" target="_blank">pmwiki@solidgone.com</a>&gt; wrote:</p>

</div>

<div>

<div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">

<p>Setting things to 755 is safer than 777. The question is,
will that work<br>
on your site, with your host, with your version of PHP, with the setup<br>
of the webserver you have? I don&#39;t know. Easiest way to find out is<br>
after creating wiki.d and uploads, to set them to 755; if you can create<br>
or edit a wiki page through the normal way, then your done.</p>

</blockquote>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<p style="margin-bottom:12.0pt">As far as I understand, setting
to 755 won&#39;t usually work (and doesn&#39;t on my system), unless the server has the
same user id as the owner of the pmwiki directory: with 755 only the user
(owner) has write permission. Pm&#39;s suggestion of using the setgid bit is a way
round that. &nbsp;</p>

<div>

<p>So it seems the correct steps are as follows:</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>1. &nbsp;In the pmwiki directory, type</p>

</div>

<div>

<p>chmod 2777 .</p>

</div>

<div>

<p>(with the dot) - this makes the pmwiki completely open for
the moment, but it has the added effect of using the setgid bit (that&#39;s what
the 2 refers to in 2777)</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>2. Execute pmwiki.php through your browser. &nbsp;This will
create the wiki.d directory.&nbsp;</p>

</div>

<div>

<p>(Suggestion: if you already have a wiki.d directory, rename
it say to xwiki.d. create the wiki.d directory as above and then move all the
files across - there&#39;s prbably a better way - but I don&#39;t know what it would be
- I think you need the server to be the new owner)</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>If you use uploads, then do an upload to create the new
directory (perhaps this can be improved) (and use the same trick as before if
you already have an uploads directory)</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>3. Still in the pmwiki directory, type</p>

</div>

<div>

<p>chmod 755 .</p>

</div>

<div>

<p>and that reverts the pmwiki directory to be as it was before
you started.&nbsp;</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>The upshot is that the wiki.d (and uploads) directory is now
owned by the server - and the ownership is recorded as &quot;apache&quot; or
&quot;nobody&quot; (it&#39;s &quot;apache&quot; on mine) or perhaps something else,
but this magic setgid (set group id) makes sure the server is in the same group
as you (the user), so you can administer the files too.&nbsp;</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>Does that make sense? &nbsp;(And is it correct? - I&#39;m not a
unix expert - just a long-time long-in-the-tooth user)</p>

</div>

<div>

<p>&nbsp;</p>

</div>

<div>

<p>James</p>

</div>

<div>

<p>&nbsp;</p>

</div>

</div>

</div>

</div></div></div>

</div>


<br>_______________________________________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
<br></blockquote></div><br>