General :: Running Apache As A Different User?
Jul 29, 2011
When I run the ps -efH command to list out all the process, I can see Apache running as root and seems to have sub-processes running as www-data. Here's the excerpt:
root 30117 1 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 30119 30117 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 30120 30117 0 09:10 ? 00:00:00 /usr/sbin/apache2 -k start
[code]....
View 2 Replies
ADVERTISEMENT
Dec 10, 2010
I'm trying to get Apache to run in a user's home directory. I changed the conf file so that Apache runs under the user and group "kiosk" and changed the DocumentRoot and Directory from the default to "/home/kiosk". Then I set Apache to start at boot (chkconfig --level 235 httpd on) and rebooted. When I checked, httpd is running as kiosk like it should (ps aux | grep httpd). However, when I try wget localhost, I get a 403 response back. If as root I call "httpd -k stop" and then "httpd -k start", then everything works exactly as it should (curiously, if I try using "-k restart", it still doesn't work). After this, httpd still shows as running as kiosk and if I check before calling start, it shows no httpd processes running as expected.
This only happens when I use httpd to stop and then start the web server. If I try to restart using apachectl I still get a 403 error. As an interesting aside, after I've used httpd, if I try using "apachectl restart" I get a "(13)Permission denied: Error retrieving pid file run/httpd.pid" error. This is all on a freshly installed CentOS 5.5 server. Why I'm seeing this very different behaviour from what I thought were just equivalent ways of starting Apache? And then what I could do to get it to start up and run properly on boot? One last item to mention is this isn't a permissions problem. I set the permissions to 777 to both the home and kiosk directories (and 666 to the web files) just to be sure that's not the problem.
View 4 Replies
View Related
Oct 27, 2010
I have recently ported from Windows to Linux (xubuntu) I am a developer, i installed everything i need, LAMP. Now in Windows i used to turn off all unnecessary Services, i don't need the Apache or MySQL service running all the time. I used: net start mysql
Whenever i needed it. How do i do the same in Linux:
1. Disabling not-needed daemons from auto-starting?
2. Starting them only when i need them?
View 2 Replies
View Related
Mar 2, 2011
if you are running Apache on a firewall system, perhaps to display a web front end for firewall configuration, how would you make sure that it is accessible only from inside the local network?
View 1 Replies
View Related
Feb 3, 2011
I have run the apache service on my machine. Many people are accessing that server. Now, I want to know who all connected to my system. How can I get that information?
View 1 Replies
View Related
Oct 25, 2010
I have to develop a php script, that acts as a man-in-the middle for a db-like-software and a webshop. This should run on a server within a DMZ, behind two firewalls, that should filter every request from other sources, than the eshop, and any other protocol than HTTPS. This server is a debian-machine, with a apache 2.2 and php 5.3. I've installed apache and php without any problems, installed openssl, generated a certificat and installed it. I tested the connection successfully. The eshop-server can connect to the server inside the DMZ without problems and receives a correct answer.
The db-like-software (called "netbasic") generates a csv-file in a fixed directory. this csv-fils has an owner called "netbasic". The file-access-rights are: -rwxr--r-- (I've some problems to interpret this. I know, r stands for read and w for write, x for both and the order is for different usergroups). My problem is now, that my php-script tries to read the file (successfull), generates output (successfull) and then deletes the file (failed -> permission denied). I figured out, that the problem is, that apache (or, I don't know, just php) don't runs as root and has therefore no write-permission. Because the server is already secured with the firewalls, we, my workmates and me, don't see a problem, to change the apache-user to root. but I don't know how this is done and don't know, what to search for.
View 7 Replies
View Related
Jul 10, 2010
I just installed apache2 on my VPS (running Debian 5 (lenny)). Problem is that when i start apache2 nothing happens.
Code:
ps ax |grep apache
and
Code:
ps ax |grep httpd
returns only the grep process itself, and
[Code]....
View 2 Replies
View Related
Aug 25, 2010
I configure my apache and can run http://localhost. There "I see it works!" but if I try to stop apache I get message that httpd is not started. I run
apachectl start - ok
but when I run apachectl stop it says "httpd (no pid file) not running"
I need to stop apache, because this is my dev machine and I want to start apache only when I make changes to my site. I am with slackware13.
View 4 Replies
View Related
Mar 7, 2010
I installed LAMPP a couple of weeks ago and was working fine. Today when I try to start lampp, it will only start MySql and ProFTPD. It says "XAMPP: Another web server daemon is already running." How can I find out where this other server is located and stop it?
View 2 Replies
View Related
Sep 3, 2009
OS :red hat 4.2 oracle EBS SUITE Applications:11.5.10
Iwould like to install Proxy(Apache) server on linux.is it possible?
I would like to trace the user activities by proxy server. we are running many applications on that.How to trace that.is there any server better than Apcache?
View 3 Replies
View Related
Jan 5, 2011
I am writing a simple application that will run as user foo (i.e. Ubuntu user foo).However, the application will connect to my database as (database user foobar). IIRC, database users have nothing to do with Linux system users - but I just need to clarify that.So can an app launched to run as user 'foo', connect to a database as user 'foobar'?
View 1 Replies
View Related
Aug 11, 2010
I have an existing quota setup which works fine for 2 users.
Say I want to add a new user, user3. Why is using "edquota -u user3" alone insufficient? Do I need to run quotacheck after running edquota for the new user?
View 1 Replies
View Related
Nov 23, 2009
I am trying to set the umask for a process(orkaudio) which is running as the root user.This program creates dir and files and I need the umask to be 022. I have edited my /etc/bashrc -- and when i type in umask i get 0022 --- Not sure how to go about getting this resolved...
View 1 Replies
View Related
Mar 6, 2011
I'm trying to get the end result to have the same format as this as well:
1 bin
2 daemon
67 erozner
[code]....
Where the numbers are the number of processes being run by the user (the name right next to it).if I input the command egrep myFile into the terminal, it should look for every line with the letter x in myFile, right?
View 5 Replies
View Related
Feb 22, 2011
My current script is as followed:
Code:
#!/bin/sh
su et
cd "media/ET"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
[code]....
I want ET to be run as the user "et" and for some reason, I can't directly su/sudo to run the file without being in the user "et" and the "/media/ET" directory.
View 2 Replies
View Related
Nov 2, 2010
Are there any tools to view/edit user space memory of running processes on Linux?
It would be a great learning tool.
View 1 Replies
View Related
Jun 8, 2011
I am currently struggling with one of my tasks.I was asked to find a way how to determine how much time an _already running_ process is spending in user and kernel space.E.G. <some tool> <pid>[Control] + [c]<pid> spent 12.1 seconds in user and 1.52 seconds in kernel space.Does something like this exist? Basically I guess I am looking for something similar to time, except that the process is already running.So..a) Is there a tool which fulfills this task?b) Is there a way to write your own software which does the job? Is it even possible to code something I am looking for?I recently found strace -c -p <pid>, but well, this is not exactly what I was looking for.
View 3 Replies
View Related
Jun 25, 2009
I've just installed latest verion of centos and am having trouble getting Apache to work or even knowing how to test it's working.
When I open up firefox and type 'http://localhost/' I am getting the message "failed to connect" firefox can't establish a connection to server localhost.
View 2 Replies
View Related
Sep 12, 2010
I am trying to run php as cgi script with apache and opensuse 11.3. I disabled the mod_php and installed mod_fcgid, and php-fastcgi, as per the instructions here. I have been trying to achieve this, but, somehow it is now working. I can see the page if i have an index.html, but if i have index.php, it downloads it as a file. I really tried to set this thing up for more than 12 hrs now. I am soo frustated.
my /etc/apache2/vhosts.d/shekhar.conf
my /srv/www/wrapper/shekhar/php5
my /etc/apache2/conf.d/mod_fcgid.conf (I uncommented the lines inside the <FilesMatch > Tag., it gave me same result, even after uncommenting the tag.)
my /etc/apache2/httpd.conf
View 2 Replies
View Related
Dec 9, 2010
I'm looking to run some R scripts on a mysql database (engine =csv) from the apache webserver.
The goal is to record some statistics/numbers while someone is logged in, pass those numbers to r, run some statistics algorithms on the passed set of data and output an image file back to the logged-in user's html web page.
Doing this along with knowledge on how to call general r functions from within a php framework would be great.
View 1 Replies
View Related
Jan 7, 2011
I'm attempting to get svn over apache running on maverick server. Here is my site config
Code:
<VirtualHost *:80>
ServerName common.subversion.xxx.xxx
ServerAdmin xxxxxxx
DocumentRoot /var/www/SVN
AddExternalAuth pwauth /usr/sbin/pwauth
SetExternalAuthMethod pwauth pipe
[Code]...
While the redhat posts indicated selinux, when I checked it with sestatus (after first installing sestatus), it came back disabled. So what is locking down the /var/www directory?
View 1 Replies
View Related
Jun 23, 2010
I have a single CentOS server with two separate NIC's. I was asked to install an internal Wiki on Apache but have that dedicated to one NIC so it's internal only. Then have just a site running on Apache on the 2nd NIC which is externally accessible. I have never done anything like this and would like tonow how difficult this would be on a single stand alone server that I have above?
View 1 Replies
View Related
Feb 11, 2011
When I do " ps aux | grep apache " I can see that apache2 is running. But when I do the same thing for http or httpd there is nothing. I looked for this question in the forums but couldn't find it. I probably don't know just what to look for.I'm using the new Debian Squeeze, and was fooling around heavily with new software installations and modifications, and just noticed all of a sudden that I couldn't get on the internet - so I know I did something but don't know what.I can plug in a thumb drive with a bitnami joomla stack on it and run, " ~/tmp/joomla-1.6.0-0/./ctlscript.sh start "and that gets things going for the joomla stuff (apache, http, mysql, php), but that stuff is pretty self contained and does not effect the browser's attempt to reach the web.
View 12 Replies
View Related
Feb 25, 2010
I just did a fresh install of ubuntu 9.10 and install apache2 webserver with php5 and mysql, but for some reason I have no idea why but when upload files to the computer running apache2 webserver
http://69.242.228.170/ is the link to the ubuntu system It's not displaying the website correctly and it's not working on any pc on my network either, but it looks fine in dreamweaver when I was designing it on my laptop. list of all the files and folders in the /var/www path
Code:
root@requiem:/var/www# ls -lh
total 92K
-rwxr-xr-x 1 root root 446 2010-02-25 18:27 bg.gif
-rwxr-xr-x 1 root root 2.3K 2010-02-25 18:27 contact.php
-rwxr-xr-x 1 root root 143 2010-02-25 18:27 content_bg.gif
[Code]...
View 8 Replies
View Related
May 12, 2015
I've installed Debian 6.0.7 with apache, php, mysql and phpmyadmin. We have a server with active directory and ldap where all the Windowsclients log on.
I want to view the username of the users visiting the Debianserver with $_SERVER["REMOTE_USER"] so I can give them personalized settings.
Tried installing the NTLM module from sourceforge but that didn't work, winbind also didn't work ...
View 1 Replies
View Related
Oct 16, 2010
I'm using ubuntu 10.04. Apache server is associated with www-data.I frequently run into problems editing or deleting files created by a cgi script, as they have ownership of www-data:www-data.How can I safely modify my system so that the output files are editable or deletable by user tim?
View 2 Replies
View Related
Aug 27, 2010
I migrated joomla to my new server and noticed that the script doesn't have the permission to edit it's own configuration file and write to the cache folder. All my files are owned by root, which I guess isn't a good idea.
As what user do the PHP scripts run? Or is this system specific? I don't want to chmod all files to 777 so I'd just like to change file and folder ownerships to the user that is executing that script.
View 1 Replies
View Related
Apr 16, 2010
i have apache and mysql running, i can access my web server by visiting localhost on port 80 but for some reason when it doesnt work when i try using my ISP provided IP address... (it used to work).. i have my router setup with a DMZ on my LAN IP (my computers IP, this is the computer in my home network that serving with apache).. i also cant seem to shut down my mysql server (theres an update ive been trying to get) even when i use sudo...
View 5 Replies
View Related
Apr 5, 2011
I'm trying to modify an existing user so that any files they create can be at least read (although writing and execution would be nice) by any other user. The reason is because I need the daemon running my Apache server to be able to access files created by a daemon running under this user, files which will be created and accessed in real-time.
View 3 Replies
View Related
Jun 3, 2011
Ok, so I have a few web apps that need to run shell commands. Heres a great example of one:
Code:
This is a PHP script getting my system volume. Herein lies the problem... www-data doesn't have permission to do this!
I changed my apache config to use MY account as the web user, and it does in fact work the way I want it to.
Obviously, I dont want to leave apache running as me, and want it to keep using www-data.... heres my question... how can I give permission for www-data to execute certain programs?
View 3 Replies
View Related