logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


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

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



CGI access files outside Apache domain

 
Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner



View previous topic :: View next topic  
Author Message
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: 6478
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


Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1