[mod_python] os.listdir()

William Chan ycchan at gmail.com
Thu Mar 24 00:58:46 EST 2005


All files in the directory are world-readable.

I couldn't run Python CLI as user apache.


On Wed, 23 Mar 2005 22:17:26 -0600, Jamieson Becker
<jamie at jamiebecker.com> wrote:
> Shot in the dark -- maybe the user Apache is running does not have read
> rights to the files in that directory but does have read access to the
> directory itself? Does it work in python CLI itself?
> 
> On Wed, 2005-03-23 at 19:52 -0800, William Chan wrote:
> > Hi,
> >
> >    I'm using mod_python. os.listdir('/tmp') in a request handler
> > returns a list of empty strings (note: the number of empty strings is
> > the same as the number of elements in /tmp). I am sure that I can
> > access the filesystem in request handlers since os.stat('/tmp').st_ino
> > returns the correct inode number. Any idea what may go wrong?
> >
> > Thanks,
> > William
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> 
>


More information about the Mod_python mailing list