logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: CGI access files outside Apache domain
Author
stockton



Joined: 15 Dec 2016
Posts: 4
Location: Midrand, South Africa

PostPosted: Wed 22 Aug '18 9:52    Post subject: CGI access files outside Apache domain Reply with quote

I have a working system that I want to use to produce a "Real Time" webpage.
The current system monitors a solar system via serial link from Inverter to a Linux PC. This in turn, using socket programming sends this data every few seconds to a 2nd Linux PC, which writes said data into a file on a USB attached HDD and there lies the problem.
I have Apache2 running on this 2nd machine but would like to create a real time web page showing the current situation with the solar system. I have created the page in HTML, calling Ajax which in turn calls either a C or PHP program to retrieve data from aforementioned text file on the USB attached HDD. namely in a folder called /media/pi/MyPassport/Axpert but both programs fail with due to permission error.
How do I solve this?
Of course, the other way would be to retrieve the data from the aforementioned socket program using Javascript or some such but how?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 27 Aug '18 15:09    Post subject: Re: CGI access files outside Apache domain Reply with quote

stockton wrote:
/media/pi/MyPassport/Axpert but both programs fail with due to permission error.


Change the permissions of that mount or change the ower / group that apache is able to access that mount.
Back to top


Reply to topic   Topic: CGI access files outside Apache domain View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner