Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Permission Problems with CGI |
|
Author |
|
craiglindley
Joined: 23 Dec 2014 Posts: 1 Location: USA, Colorado Springs
|
Posted: Tue 23 Dec '14 17:33 Post subject: Permission Problems with CGI |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 23 Dec '14 23:51 Post subject: |
|
|
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 |
|
|
|
|
|
|