
|
View Full Version : Control panel rant
ToastyX 02-14-2002, 02:37 AM I've tried a couple of control panels and tried demos of many others, but I don't really like any of them. That makes me want to create my own. I do have the skills it takes to create my own control panel, but do I really want to spend all that time and effort that goes into making one? My main problem is, I never finish anything I start, but anything I do make is high in quality. I have a very good understanding of Linux, but there are still some things I don't have experience with. I find there's not many control panels available for FreeBSD. I'd like to support any distribution of Linux, along with FreeBSD. Anyway, I'm just dreaming right now. I've seen how much control panel software costs, and if I made one, I could make quite a bit of spare change. Just, I don't really know if it's worth all the time and effort. I've always been good at programming, but I've never put the skill to good use. I am very good with C. It's is my favorite language, and UNIX was built on C, so that's a big advantage on my side. Anyway, I'm just ranting. Feel free to post your thoughts on writing your own control panel or the functionality of existing ones.
vselvara 02-14-2002, 03:47 AM I have been working on a control panel for a while now. Its really not easy. I try to finish everything I start, even if it takes years. Its been over a year and here I am still working on it. I had a lot of experience with cobalts so I wanted to make a control panel similar to the cobalt raq. There were many things I did not like about the cobalt raq. My main goals are, reliability, speed, and usablilty. I am not trying to make a control panel + billing + shopping cart + guest book + forums + ticket system + you know what I mean. I just want to make a simple control panel.
I started off writing it in C. I had been programming in C/C++ & Java when I started the project. I later learned that writing the entire control panel using java servlets would be much faster than using c programs running as CGI. Also making a database connection with JDBC is much simpler than using the mysql++ api. Another thing to concider is, on a cobalt if two people are creating a site at the same exact time and hit that submit button then there could be a problem. The problem is, 2 processes cannot write to a file such as httpd.conf at the same time. Well I got around this problem by using SingleThreadModel which ensures that only one instance runs at a time. Also I make creating sites faster by spawning a thread to handle time consuming tasks such as restarting apache, sendmail, bind. And have threads to update config files like httpd.conf, virtusertable, and so on..
Overall, the only contrl panel I really like is the Cobalt Raq. The things I dont like about it is that it is coded in perl, slow, and patches sometimes create more problems than they fix. Their interface is great, I havent seen any other control panel as clean as theirs.
If you plan on starting a control panel, take it slow. Ideas may come slowly. There were many times when I felt like it was not worth finishing. I am still working on mine. I hope to finish in a month or two.
priyadi 02-14-2002, 08:44 AM I don't think it is a good idea to use Java for creating a control panel, especially if your control panel needs to manipulate user owned files. A quick search on google reveals that it is not simple to use system calls needed for secure file operations, like seteuid() and setegid(). Even if it can, it would be very hard to do that in a multithreaded long running process (JVM), especially if your o/s uses threading in a single process. But I'm not a Java expert myself, so I could be wrong.
I personally use Perl CGI scripts, it is simpler to create secure code as CGI scripts is very short lived, I can safely drop a process privilege and not worry about regaining it later. Yeah, it is slow, but I'd rather use slow and secure than fast but insecure. I can make it faster by using mod_perl but then it will have the same problem as I stated above.
vselvara 02-14-2002, 02:58 PM Cobalt gets around this problem setuid and setgid by running a seperate apache as root. I do it by running a seperate tomcat server on a different port as root. In java there is no way to set the uid or gid like in C for security reasons.
priyadi 02-14-2002, 04:17 PM Originally posted by vselvara
Cobalt gets around this problem setuid and setgid by running a seperate apache as root. I do it by running a seperate tomcat server on a different port as root. In java there is no way to set the uid or gid like in C for security reasons.
Yes, that's exactly my point. AFAIK, it is not possible to do secure file operation on user owned files from root owned process without using seteuid()/setegid() or equivalent system calls.
Vortech 02-14-2002, 04:19 PM H-Sphere is made in jave right?
ScottD 02-14-2002, 04:29 PM HSphere is in Java and it works nicely from what I have seen.
If you run into problems you can always extend your java code using JNI and pretty much do whatever you want. If that is too tough, you can shell out to processes written in C or Perl modules and let them do the dirty work for you.
Personally, I think Java would be a great choice for a control panel. It already has all of the threading and network API's available, not to mention a really nice data access layer (JDBC).
Good luck, and don't give up!
priyadi 02-14-2002, 04:30 PM Originally posted by Vortech
H-Sphere is made in jave right?
Yes, but I cannot say if it is vulnerable. I don't know java enough to actually say anything about this, maybe there is something else in Java that I don't know yet. But maybe if someone could lend me a h-sphere account, then I might be able to say something.
vselvara 02-14-2002, 04:57 PM Thanks DizixCom.
Originally posted by priyadi
Yes, that's exactly my point. AFAIK, it is not possible to do secure file operation on user owned files from root owned process without using seteuid()/setegid() or equivalent system calls.
As DizixCom said, you could run external programs in 'C', perl or whatever to do the dirty work that Java cannot handle. So I dont understand what you meant by user owned files. Most configuration files are owned by root anyway.
There is a demo for H-Sphere http://www.psoft.net/h_sphere_demo_page.html.
ckpeter 02-14-2002, 05:00 PM Well, from what I know, H-sphere code the business logic in java, but use native script and asp files to write to the system(windows, unix,...)
I could be wrong.
Peter
priyadi 02-14-2002, 05:13 PM Originally posted by vselvara
Thanks DizixCom.
As DizixCom said, you could run external programs in 'C', perl or whatever to do the dirty work that Java cannot handle. So I dont understand what you meant by user owned files. Most configuration files are owned by root anyway.
There is a demo for H-Sphere http://www.psoft.net/h_sphere_demo_page.html.
If the cp supports things like web based file manager, then it needs to do file operation with user owned files, like Cpanel does.
The demo is useless, I need a shell account as well :)
vselvara 02-14-2002, 05:25 PM Okay now I see what you are talking about. The control panel I am working on will not have all those added features. Like I said earlier, I just want to make a "bare-bones" type of control panel without all those added features. It gets too complicated to put too much into a control panel. I also dont like the idea of adding features which are not extremely neccessary. HSphere tries to merge a ticket system in its control panel from what I saw in the demo.
One product cant do everything. There is no one unix command with a hundreds of flags to do any type of file operation. There are many unix commands to divide the task. Just like that a control panel should focus on one thing and not try to do everything. There are good ticket system software out there, there might also be some good file managers. FTP is better and faster anyway.
priyadi 02-14-2002, 05:40 PM From a quick look from h-sphere documentation, it seems h-sphere uses perl in some administration tasks. So, you guys are right, I think.
|