473,382 Members | 1,313 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,382 software developers and data experts.

Client login to apache as root???

109 100+
Hi... i am trying to do some CGI with apache http server.

I would like to do some simple things such as creating a folder in the server when i login. However.. i found out that when i login i am not a root user. So i wont be able to create any folder due to permission.

Anybody know how to login as root when i login to the server?
Jun 7 '07 #1
9 4345
Motoma
3,237 Expert 2GB
Hi... i am trying to do some CGI with apache http server.

I would like to do some simple things such as creating a folder in the server when i login. However.. i found out that when i login i am not a root user. So i wont be able to create any folder due to permission.

Anybody know how to login as root when i login to the server?
THIS SHOULD NOT BE DONE!

Instead, change the permissions on the folder you wish to have Apache access.
Jun 7 '07 #2
skyy
109 100+
Hi... i need the client to act as root to run some command such as changing the ip address. This require root access..

any idea?
Jun 12 '07 #3
Motoma
3,237 Expert 2GB
Hi... i need the client to act as root to run some command such as changing the ip address. This require root access..

any idea?
Change IP Addresses? You won't be able to access the server afterwards!
Create a shell script that does the work for you. Make this script have the SUID property.

PLEASE READ THE FOLLOWING. I need you to understand the security implications this could have if done improperly.
Dangers of SUID Shell Scripts
Jun 12 '07 #4
skyy
109 100+
Change IP Addresses? You won't be able to access the server afterwards!
Create a shell script that does the work for you. Make this script have the SUID property.

PLEASE READ THE FOLLOWING. I need you to understand the security implications this could have if done improperly.
Dangers of SUID Shell Scripts

Hi thanks.. i managed to do it with SUID...
Jun 12 '07 #5
Motoma
3,237 Expert 2GB
Glad you have found your solution. If you are still worried about security I have devised another way which is likely to be more secure:
Have apache write the desired IP information to a file.
Have a cron script run every minute to check for the file. If it exists, read it and perform the change then delete it.
Jun 12 '07 #6
skyy
109 100+
Glad you have found your solution. If you are still worried about security I have devised another way which is likely to be more secure:
Have apache write the desired IP information to a file.
Have a cron script run every minute to check for the file. If it exists, read it and perform the change then delete it.
Hi.. this seems to be a good solution..

Can show me how to write the script?
Jun 13 '07 #7
Motoma
3,237 Expert 2GB
Hi.. this seems to be a good solution..

Can show me how to write the script?
Haven't tested it, but it would be something like this:

Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. VAR=`cat /var/www/html/ipchange.txt`
  3. ifconfig eth0 down
  4. ifconfig eth0 $VAR
  5. ifconfig eth0 up
  6.  
Jun 13 '07 #8
skyy
109 100+
Haven't tested it, but it would be something like this:

Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. VAR=`cat /var/www/html/ipchange.txt`
  3. ifconfig eth0 down
  4. ifconfig eth0 $VAR
  5. ifconfig eth0 up
  6.  
Hi thanks.. i meant how to write the cron script to let it check for a file every minute?
Jun 14 '07 #9
Motoma
3,237 Expert 2GB
Hi thanks.. i meant how to write the cron script to let it check for a file every minute?
Yeah, that was the cron script. Take a look at man crontab to see how to set the script to run.
Jun 14 '07 #10

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

Similar topics

2
by: John | last post by:
Hello I have created login pages but am having problems when I test them for my site. When I type all the registration info in it accepts it no problem. When I try and sign in though and then...
5
by: Grant Collins | last post by:
Hi I am writing a web based application as part of a small project that I am undertaking using servlets beans and jsp. I already have one servlet - bean - jsp page working and I have written...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
0
by: ./Rob & | last post by:
Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it...
4
by: Yasaswi Pulavarti | last post by:
On an AIX server, I used the db2install script from the command line to install the DB2 UDB 8.1 client. I applied the fix pak 7 to it. Now I need to use the client to test connections to another...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
19
by: Alex Madon | last post by:
Hello, I am testing a web application (using the DBX PHP function to call a Postgresql backend). I have 375Mb RAM on my test home box. I ran ab (apache benchmark) to test the behaviour of the...
3
by: focussys | last post by:
hi i am a student and am doing this for one of my assignments i am trying to create a login using perl and mysql database.i was succesful in doing that now i want to use cookies for...
9
by: John C. Frickson | last post by:
My company produces reports for our customers in PDF format. I have a php script that verifies login status and access rights, and sends the pdf to the client using readfile(). This has worked...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.