473,385 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Re: Mod_python permission denied


Ok, solved: apache is unable to follow relative paths from the script.
Putting ol absolute paths it's ok!

Simo D wrote:
>
Hi, I'm using a script.py to write a file in a dir on the server.
Mod_python work but i get:
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)

File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py", line
204, in handler
module = page_cache[req]

File "/usr/lib64/python2.4/site-packages/mod_python/cache.py", line 82,
in __getitem__
return self._checkitem(name)[2]

File "/usr/lib64/python2.4/site-packages/mod_python/cache.py", line 124,
in _checkitem
value = self.build(key, name, opened, entry)

File "/usr/lib64/python2.4/site-packages/mod_python/publisher.py", line
77, in build
return ModuleCache.build(self, key, req, opened, entry)

File "/usr/lib64/python2.4/site-packages/mod_python/cache.py", line 371,
in build
exec opened in module.__dict__

File "/var/www/html/flood/py/flood_pdf.py", line 18, in ?
c.save()

File "/usr/lib64/python2.4/site-packages/reportlab/pdfgen/canvas.py",
line 881, in save
self._doc.SaveToFile(self._filename, self)

File "/usr/lib64/python2.4/site-packages/reportlab/pdfbase/pdfdoc.py",
line 218, in SaveToFile
f = open(filename, "wb")

IOError: [Errno 13] Permission denied: 'wms.pdf'
The dir has the read, write and execute permissions and SELinux is
disabled.
Can you help me?
Thanks in advance.
Simone
--
View this message in context: http://www.nabble.com/Mod_python-per...p20378315.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Nov 7 '08 #1
0 2330

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
0
by: cyberco | last post by:
Opening, reading and writing to a file works fine in mod_python, but using fileinput (with inplace editing) gives me a 'permission denied' with exactly the same fileName: ...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
3
by: kaush | last post by:
Hi, I am using Apache and mod_python to service POST/GET requests on MAC OS. My script tries to create a file file = open(file_path, 'w') This fails with the following error EACCES
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
0
by: Simo D | last post by:
Hi, I'm using a script.py to write a file in a dir on the server. Mod_python work but i get: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most recent call last): File...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.