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 -> Apache View previous topic :: View next topic
Reply to topic   Topic: Permission Problems with CGI
Author
craiglindley



Joined: 23 Dec 2014
Posts: 1
Location: USA, Colorado Springs

PostPosted: Tue 23 Dec '14 17:33    Post subject: Permission Problems with CGI Reply with quote

Hello,

I'm using Apache2 on a Raspberry Pi to provide a UI for controlling my robot. My robot control page contains javascript which in turn calls a cgi function. Within the CGI function I open a serial port and output a string then close the port again. My problem is that opening the serial port within the CGI fails because of permission problems. If I do a chmod on the serial port dev and allow everyone to read/write the port, everything works. What I want to do is put whatever user Apache2 is running as when trying to access the serial port into a group that is granted serial port dev access. Anyone know what user that would be?

Thanks for listening
Back to top
James Blond
Moderator


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

PostPosted: Tue 23 Dec '14 23:51    Post subject: Reply with quote

Depends on the linux you run on your pi. If it is debian based the user is www-run

However you can see user using htop (better version of top). And you can define the user and group apache is running on in apache2.conf

If you have a different pi OS let uns know.
Back to top


Reply to topic   Topic: Permission Problems with CGI View previous topic :: View next topic
Post new topic   Forum Index -> Apache