Networking :: Starting Apache Using Someother User And Not Root?
Jun 24, 2010
We have installed apache 2.2.15 webserver on A rhel 5 Linux 64 box using the user wwwadm group www
We can start the webserver using root and it works fine but we dont have root access forever so we want the wwwadm user to have all the rights and we can start/stop/restart the Apache server using this wwwadm user.
I put this file in cgi-bin folder of Apache server. Here is my problem : when I run this file with shell as root user it makes change to iptables, but when I use my browser to run this file, it doesn't make any change. I'm sure this is because Apache doesn't have permission to manipulate iptables. How can I start Apache as a user with root privileges ?
Is It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user
extract.ksh use this scripts topic_file_publish.sh but extract.ksh resides in /data/apps/pnbos/scripts
but topic_file_publish.sh in below directory/data/apps/pnbgstk/publication >
ls topic_file_publish.sh topic_file_publish.sh fraespappp8:/data/apps > type topic_file_publish.sh topic_file_publish.sh is hashed (/data/apps/pnbgstk/publication/topic_file_publish.sh)
How it is done?
since topic_file_publish.sh is being directly referenced in the code with absolute path.
I need to create an SSH user that can only access the directory I would specify for them. For example, I've been able to execute the following: useradd -d /home/me/directory_for_this_user someuser
So when someuser logs in they get into this directory. Problem is that once they log in they can simply execute: cd / and navigate through all other directories which is a security risk.
How I could limit someuser's access to only /home/me/directory_for_this_user and its subdirectories and nowhere else in the system?
Two days back I installed had setup subversion for my laptop from the following link HOWTO: Setting Up Your Own SVN Server (Using Apache and mod_dav_svn) - Mark S. Kolich
I don't know where I messed up the apache server. Now I am unable to start the apache server. I get the following error message:
I installed Apache, and it works fine. However, when I rebooted my CentOS, httpd did not start automatically. What do I need to do to ensure it starts when the system boots?
I'm running a server with CentOS 5 where the software that needs to run on the server uses ifconfig to verify the system IPv4.The problem is that /sbin isn't set for the user that is supposed to run the software (sadmin) which means the software can't execute ifconfig and thus terminates.now the workaround I've been using is simply to input.
Apache is set to start on runlevel 2, 3 and 5, just like MySQL. For some obscure reason this always fails. I tried resetting the runlevels, but this did not help and I always have to start apache manually after reboot.
How can I analyze this problem? In the Apache logs I don't find the cause. Is there an other log I can check?
When I try to start Apache2 (apachectl start) the command prompt returns right away. But when I check the processes (ps ax) I can't find httpd. And when I try to hit the server from a browser I get "the page cannot be displayed" error.
I have a problem, I'm have a course at high school (webserver management) in class this morning we had to install apache, php, ftp and so on but I didn't finish on time so when I got home I was playing around. I'm on wireless here and changed the vm connection from bridge to nat.
normally we had to install apache using yum (yum install httpd) and start the service. that's what I did and then we had to go to firefox (or IE) and type the ip of our server. but when I do I get "problem loading page" instead of the apache default page. I've set httpd runlever 2 to 5 to on and rebooted. but still not working.
Figured out a straight shot at connecting to the Internet in Fedora 15. Follow these commands.
1.)****** SWITCH TO ROOT USER if you don't have privileges******* 2.) cd /etc/sysconfig/network-scripts 3.) rm ifcfg-XXXXX (DO NOT REMOVE THE IFCFG-LO) 4.) system-config-network
-> Once in this screen, press the enter key on "Device configuration" -> Configure your network statically. ( I did the following.) Name: leave as default Device: Leave as default DESELECT "Use DHCP" Set Static IP as 192.168.2.117 (or 192.168.1.117) Set NetMask as 255.255.255.0 Set "Default Gateway IP" AND "Primary DNS Server" to 192.168.2.1 (or 192.168.1.1)
I'm setting up Ubuntu Karmic on my sister's old computer for my nephew, he's quite young so my sister asked to install some content filtering. I'll first setup an OpenDNS account and I've installed and managed to get dansguardian and squid working on a virtual machine to try it out. so far it's working pretty well, but I need to secure it form the inside out.
I was thinking of blocking specific outbound ports so he could not bypass the proxy. because by default the firefox configuration can be easily changed. so I have a couple of questions.
1. is it possible to block outgoing ports on Ubuntu? 2. is that the best method? 3. is there anything else I should be aware of to prevent subversion?
lastly, this question is probably unrelated to this board but I've set up a cron job to update a dynamic ip with OpenDNS, the problem is that the password is in clear text in the user's crontab, can I play with permissions? is it possible to run the job under a root account and deny read/write access to a normal user?
I am trying to install Zend Server, and that went well. Apache and all the other items were installed.
But when I go to start Apache, I get this error:
Quote:
root@laptop:~# /etc/init.d/apache2 restart * Restarting web server apache2 Syntax error on line 6 of /etc/apache2/sites-enabled/zendserver_gui.conf: Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration [fail] And on line 6: php_admin_flag tidy.clean_output off The rest of the file is below:
Quote:
# Warning: Modifying this file will break the Zend Server Administration Interface Listen 127.0.0.1:10083 NameVirtualHost 127.0.0.1:10083 # do not allow override of this value for the UI's Vhost as it should always be off when generating non-html content such as dynamic images code....
First post here so I'll do my best to provide the information needed.
System:
Dell Poweredge R310 Xeon 3460 2.8Ghz 4x2GB ram 4x 160GB Sata 7.2k (RAID 10) Ubuntu Server 64bit
If I type as root, "reboot" or "shutdown -r now", nothing happenings - except the apache2 process stops + the usual "System is going down for reboot now". If I type "shutdown -h now" the system goes down.
Upon booting the server back up, MySQL starts correctly, but Apache2 does not - I have to run "service apache2 start", and it starts up fine.
I feel the 2 issues are related. I've reinstalled apache2 completely (configs and all) and this didn't help - I used yum to install/reinstall it.
I have an Ubuntu 10.04.1 AMD64 server running Apache with SSL. In the past, even though I have a passphrase on my key file, I have only needed it if I manually restarted Apache2, never after reboot.
I recently switched from a self-signed cert to one from a CA. I'm not sure if this is what caused it, I also installed a few packages (AWStats, PHPSysInfo and Munin) that all interact with the webserver.
Anyway, I just noticed that now after a reboot Apache starts but doesn't work. I need to kill that process and start a new one with the passphrase (maybe on the console it is prompting me, I mainly use SSH access since the server is headless).
Why did Ubuntu used to 'remember' the passphrase on the self-signed cert but now I need to provide it?
My sever auto-updates so it would be annoying to have this thing go down regularly after a patch that requires a reboot.
I have just installed Ubuntu 10.04 and it works fine. Next, I attempted to install Apache 2.2.16 server on the machine. I was able to get Apache installed but I cant't get it to start. The command I used to get it to start is "apachectl -k start" and got the response "command not found". Then I used the absolute path which is "/home/Administrator/Downloads/apache/bin/apachectl -k start" and got the response"httpd: could not reliably determine ther server's fully qualified domain name, using 127.0.1.1 for ServerName(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80.no listening to sockets available, shutting down". Please advise me on what to do. My eyes hurt from looking at the screen for so long trying different options and reading almost all the apache install instructions that exists. Just ready to have it up and running.
Here are the specs of my machine: Linux matrix 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:12 EDT 2008 i686 i686 i386 GNU/Linux Red Hat Enterprise Linux Server release 5.2 (Tikanga)
When I run an ldapsearch in root, it works fine. tcpdump filtered by dest IP shows packets captured.
When I run an ldapsearch in a perl script as root, it works fine. tcpdump filtered by dest IP shows packets captured.
However, when I run it via a perl script in my cgi-bin directory it fails. tcpdump shows no packets captured. When I added a "2>&1" to my ldap search in my cgi script, I got "ldap_bind: Can't contact LDAP server (-1)".
I ran a "whoami" in my cgi script and it showed up as apache.
Another twist to all this is that I ran the same test on my slackware box, and everything works (esp the cgi script). Here's what the specs are on that machine:
Linux slackvm 2.6.29.6-smp #2 SMP Mon Aug 17 00:52:54 CDT 2009 i686 Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz GenuineIntel GNU/Linux
I checked the permissions on the ldapsearch file and directory, and they're the same (755).
Could there be something blocking the apache user on my Red Hat box from sending packets out?
i am having problems with privileges i have created a new user with my name, but i cant get root privileges on it. i need the same privileges as the root profile.
I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.
i used opensuse 11.1 ...there is option for root user to create password for root...but for ubuntu i did not find anything like that...so how can i create root password....or how can i use root
i just installed linux mandriva 2009. i set password for root and created a user account. when i try to login as root, after logging out as user, it does not allow me and gives the error "root logins are not allowed". even it does not show the root account. if i try to go to root from konsole terminal using su root, it allows to enter as a root but when i try to start the GUI with startx it gives error.not sure what to do and why i can't see my account in GUI mode
I found that if any usual user is logged into a NDS-tree, then _local_ root has full access to user's network shares, including the user's home directory located on remote Netware-server. Is it by design or have I missed something? Nevertheless in windows local admin has no access to network resources mounted of any other user. If you runas shell (as admin) then admin in principle can't "see" network shares which were mounted (connected) by other users - they are accessible ("visible") per session.
I am using mint 8 for a 2 weeks, I am noob to linux but I like Mint than any other linux distro which is great alternative to windows. I have a problem regarding password reseting.
1. My laptop automatically get logged in without asking user name and password.
2. I tried to change password for newly created user and root user using graphical way but it does not work.
2. I can perform administrator task using only OEM user which is default inbuilt user of mint.
How can make my laptop to ask password when mint get booted? How to change password for other users?
A friend of mine has told me to set a root password and use root (f.e. switching to su in terminal and work with root rights instead).Is there any way to unset the root password? I know how to use sudo now.
I am using Ubuntu 11.04. I am also using xampp 1.7.4.It always says it needs to be run as root, however some people have mentioned that it poses a great security risk.So how do i run xampp without being root?
I've set up a second user for myself on my laptop.
My user on the laptop is 'tiger'
Let's call the second user 'jrdobbs'
I would like to log on to gmail/facebook/etc using the jrdobbs, but I don't want to switch users via X... I just want a second instance of firefox open, which stores all of its login information under /home/jrdobbs.
My naive attempt looked like this:
Code: su -l -c "firefox" jrdobbs Here was my thinking: start firefox under 'su jrdobbs' ... firefox should store its files under the current user's $HOME/.mozilla