473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Run as non root?

Hey guys,
I'm running php 5.2.6 on an apache server. All I'm trying to do is write a simple script to run a program on the server, but I need to run it as a regular user. Does anybody know how to do this?

Thanks in advance.
Jul 6 '08 #1
4 3045
dlite922
1,584 Expert 1GB
just give read or execute permission to all on the file and PHP will be able to read.





_Dan_
Jul 6 '08 #2
pbmods
5,821 Expert 4TB
Heya, Muffinthief.

Apache should be configured to run as (generally) www, apache or nobody. This value can be changed in httpd.conf in Apache's configuration directory.

If your webserver is executing scripts as root, you need to fix this ASAP! Look for the User directive in httpd.conf (http://httpd.apache.org/docs/2.3/mod...mmon.html#user).

Who is your hosting provider?
Jul 6 '08 #3
Thanks pbmods, that's what I needed. As for my hosting I just have my own server running on localhost for testing. I left it at the default and the program that I was running approximated that as root.
Jul 7 '08 #4
pbmods
5,821 Expert 4TB
Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime!

I'm going to go ahead and move this to the Apache forum for reference.
Jul 7 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: lawrence | last post by:
My company is leasing a server from Interland, which is a very large web hosting company. I assume Interland knows how to set up a BSD server with the usual add-ons, including PHP. But when I run...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
13
by: Kishor | last post by:
Hi Friends Please help me to write a C program to find the 5th (fifth) root of a given number. Ex:(1) Input : 32 Output : 5th root of 32 is 2 Ex:(1) Input : 243 Output : 5th root of 243 is...
2
by: Clint Olsen | last post by:
Hello: I posted a thread on comp.programming awhile back asking about an algorithm I implemented on square root. The idea was to use the square root of a prime number as a convenient way to get...
1
by: William Stacey [MVP] | last post by:
I need a bullet proof way to combine a root and a relative path to form a FQ rooted path (similar to a VDir in IIS). Path.Combine alone will not do the job in all cases. I also need to be sure...
3
by: Nalaka | last post by:
Hi, I have an asp.net web application (www.myWebSite), and a subweb application (www.myWebSite/subSite). How do I set it so that, subweb application (www.myWebSite/subSite) be the root...
32
by: priyam.trivedi | last post by:
Hi! Could anyone tell me how to find the square root of a number without using the sqrt function. I did it by using Newton's Formula. How can it be done by using the Binomial Theorem/Taylor...
8
by: VK | last post by:
Can be multiple instances of element used as the root element? That's a curly way of asking, but I did not come up with a better sentence, sorry. What I mean is with a document like: <?xml...
2
by: shiva359 | last post by:
Hi , could someone throw some light on why do default software when installed ( as root for creating an instance leaves us with some world accessable directories & some ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.