?
Solved

access to OS from website

Posted on 2005-03-10
8
Medium Priority
?
218 Views
Last Modified: 2012-05-05
RH9 running apahce 2 and  PHP4.

Is it possible for the website on this box to restart a process (sendmail)? if so how is it done?

Purpose: I wrote an application in php that has alot of email notifications. My clients, for whatever reason, requested that they have the ability in the administration to change the sendmail configuration. This would of course require the sendmail to be restarted so the changes take effect.
0
Comment
Question by:whozie
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 13512634
Could it be done? Yes, but it would almost certainly be a bad idea and I can't think of any reason that it should be necessary if Sendmail was properly set up. What reasons are your clients giving for needing this?
0
 
LVL 2

Author Comment

by:whozie
ID: 13512656
Reasons, dont know, here is the actual request:

"We need to be able to access the smtp mail config from setup."

In the end I'll probaby just give them simple instructions to access the files and edit with pico or something. But i'd still appreciate a solution just incase they are stubborn....its their money /shrug.
0
 
LVL 2

Author Comment

by:whozie
ID: 13512665
Also, its a linux machine thats on an exchange network, the mail is sending fine to the mail server now and I dont know why that would ever change...but apparently it will.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 40

Accepted Solution

by:
jlevie earned 600 total points
ID: 13512700
If you could pin them down on exactly what they'd want to be able to change it wouldn't be that difficult to create a web interface for simple changes. I presume that you are already aquainted with what's in a sendmail.mc and you can probably see that a generic interface to the config would be pretty difficult to do in a safe manner.
0
 
LVL 2

Author Comment

by:whozie
ID: 13512729
Yeah that would be difficult...because I have it setup with SMART_HOST and thats in the sendmail.mc. And the smtp_path is in php.ini so no help there. I probably should of thought this through before I even posted =P Maybe I'll just make a page with instructions on how to use command prompt and pico! woohoo.
0
 

Expert Comment

by:Spurgeon
ID: 13515928
try to make a cronjob of it. so it restarts in a certain amount of time...
edit > /etc/crontab
0
 
LVL 12

Assisted Solution

by:mburdick
mburdick earned 400 total points
ID: 13524695
"Hi. I'd like to be able to completely trash the configuration of your server from a web page. And, I'm still going to hold you responsible for anything I break."

Bad idea.

JLevie has the right idea - find out what they are looking to do. Then, you can devise a way to give them what they *need*, as opposed to what they *asked for*. Ask them what they need access to the configuration, what they need to change, what they need to change it to, and WHY. Harp on the WHY.

Chances are, they either really don't need to change anything at all (you could just set up all the components in advance), or they're looking to do things that they shouldn't be doing anyhow (and you shouldn't let them).

It almost sounds like they want the ability to change how/when they receive notifications? That's something that can be controlled outside of sendmail...
0
 
LVL 2

Author Comment

by:whozie
ID: 13525183
Apparently they change the IP of their email server frequently, when updating....I have no idea why. They said something to the effect "its easier during the transition to use a new IP"..i'm not a networking person so I'm not asking questions. They are savy enough with complex config files and command prompt to edit it with pico...so I'll give them instructions and a very straight forward disclaimer.

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month3 days, 11 hours left to enroll

601 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