Solved

Need assistance running PHP EXEC as local user on Ubuntu

Posted on 2013-12-05
5
473 Views
Last Modified: 2013-12-11
I know there are a number of ways to do this, but looking for something very simple to do.

I need to launch the following vlc script via PHP & EXEC, as a local user. I currently can run it as www-data, but I need to launch it with a user that has a home directory.

vlc -I dummy dvb:// :dvb-adapter=0 --sout '#standard{access=http,mux=ogg,dst=10.10.1.83:8181}'
0
Comment
Question by:tamray_tech
  • 3
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39700052
That requires 'suEXEC' except that I think that only works when you are using 'per user' sites in 'public_html'.  That places the files you want to run in a web directory in that user's home directory.  More info here: http://httpd.apache.org/docs/2.2/suexec.html
0
 

Author Comment

by:tamray_tech
ID: 39701027
I spotted this in my research. From what I see, I would need to recompile Apache for this. Is that correct? if so, i would rather find a different option.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39701589
I don't believe there is another option.  Apache runs under a very limited user on purpose.  suEXEC is the way to change that.
0
 

Author Closing Comment

by:tamray_tech
ID: 39712229
I implemented Suexec-common on Ubuntu and achieved the results I was looking for. No need to recompile, just configure and activate.

Thanks
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 39712240
You're welcome, glad to help, and thanks for the points.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now