Hi;<div>I encountered and solved this problem before with the help of the list, but it's back, and I've reviewed and done everything I was shown to do last time, so I'm lost. Here's the script:</div><div><br>
</div><div><div>#!/usr/bin/python</div><div><br></div><div>import cgitb; cgitb.enable()</div><div>import cgi</div><div>import sys,os</div><div>sys.path.append(os.getcwd())</div><div>from login import login</div><div>import MySQLdb</div>
<div>import re, string</div><div>import fpformat</div><div><br></div><div>form = cgi.FieldStorage()</div><div>width = form.getfirst('width')</div><div>lines = '''</div><div>#!/usr/bin/python</div><div>
<br></div><div>return %s''' % width</div><div>f = 'width.py'</div><div>try:</div><div> os.remove(f)</div><div>except OSError:</div><div> pass</div><div>f = open(f, 'w')</div><div>f.writelines(lines)</div>
<div>f.close()</div><div><br></div></div><div>Simple enough. Here's the permissions:</div><div><br></div><div><div>drwxrwxrwx 31 root root 4096 Feb 23 04:57 ..</div><div><div>-rwxrwxrwx 1 root root 390 Mar 1 05:52 preload.py</div>
<div><br></div><div>All loaded up deliberately to try and get it to work. Here's the error:</div><div><br></div><div><div> /var/www/html/<a href="http://globalsolutionsgroup.vi/preload.py">globalsolutionsgroup.vi/preload.py</a></div>
<div> 21 except OSError:</div><div> 22 pass</div><div> 23 f = open(f, 'w')</div><div> 24 f.writelines(lines)</div><div> 25 f.close()</div><div>f = 'width.py', builtin open = <type 'file'></div>
<div>IOError: [Errno 13] Permission denied: 'width.py' </div><div> args = (13, 'Permission denied') </div><div> errno = 13 </div><div> filename = 'width.py' </div><div> strerror = 'Permission denied'</div>
<div><br></div><div>What'd I do wrong?</div><div>TIA,</div><div>beno</div></div></div><br>-- <br>The Logos has come to bear<br><a href="http://logos.13gems.com/">http://logos.13gems.com/</a><br>
</div>