Root access...

Marketcake

God of Leisure
Dec 6, 2009
450
8
0
Paradise
I want all my domains on my server to have their own IP.

According to my host I need to make a new cpanel/new account for each domain.

This, I can handle, as I can access all the cpanels from within WHM.

The one thing I can't fucking stand though, is that any php files I upload with my root account wont work and return a server error, i need to keep track of ALL the god damn root accounts for each domain, and update files ONLY with that account... meaning i have like 30 fucking root accounts if i want to edit a file on any of my domains.

Is there no php module or extension or something that can fix this???

How do you keep track of your dedicated server, this shit is annoying as cunt.
 


your message is difficult to understand and I think you are misusing the term "root"

1. you could save the domainname/username/password of each of your sites in your ftp client such as filezilla. then its just a matter of choosing the domainname you want to login to and it remembers your username/pass

2. you could enable root ssh login and connect to your server via SFTP with root username and password. then you can navigate to:

/home/%username%/public_html/

to access the files of each site on your server. you would need to have some idea of what username is assigned to each domain.
 
Yeah that fucking drove me crazy with WHM so I said fuck it.

Is there an alternative?

your message is difficult to understand and I think you are misusing the term "root"

1. you could save the domainname/username/password of each of your sites in your ftp client such as filezilla. then its just a matter of choosing the domainname you want to login to and it remembers your username/pass

2. you could enable root ssh login and connect to your server via SFTP with root username and password. then you can navigate to:

/home/%username%/public_html/

to access the files of each site on your server. you would need to have some idea of what username is assigned to each domain.


I probably am misusing the term. What I mean to say is that.. if I have to make a new cpanel (to get a new IP) for each domain (say 30), then that means I have to keep track of 30 account usernames/passwords (whether they are root or just the cpanel).. because if i try to edit it with another account (say just my one root account that has access to all other user accounts), I can view files but cant edit them because they won't have the rights of that particular account. so i need to re-login with FTP for that account.

I want all my shit to be in one place, accessible by one username/pw. Keeping a new login info for a new domain (which I get all the time) is just fucking retarded.

I have considered the first option you mentioned, which Im currently doing. But I have a lot of domains, and honestly I go back and forth between them constantly. Relogging in for each change wastes time.

option 2 is what im complaining about.. keeping track of all those. i guess ir eally have no choice though
 
Do the php files require a certain ownership or permissions to work correctly?

You may have to change permissions and users of said php files(chmod/chown) for them to work. That specifies who can write/read the file(chmod), or when uploading as root you have to change the ownership of the files to the specific user(chown) you specified when creating the account in whm.

Do what sloop said, enable root ssh and connect via sftp or ssh then find each specific username's public html. Trying editing it from there, if you are still getting the server errors you will most likely have to upload the files individually with each user/pass or chown them to the appropriate user.
 
Is there an alternative?

Yes, switch to another host with a different control panel.

All you have to do is point the name-servers the domains pointed at, to the ip(s) you want it on. Or you can also do it via Apache Virtual Hosts. I found WHM to be crazy inefficient.
 
I use ZenSix (they use DirectAdmin), but there are many other ones out there. I prefer a simpler control panel and if I need to get anything complex done I have no problem at the control line.
 
Do the php files require a certain ownership or permissions to work correctly?

You may have to change permissions and users of said php files(chmod/chown) for them to work. That specifies who can write/read the file(chmod), or when uploading as root you have to change the ownership of the files to the specific user(chown) you specified when creating the account in whm.

Do what sloop said, enable root ssh and connect via sftp or ssh then find each specific username's public html. Trying editing it from there, if you are still getting the server errors you will most likely have to upload the files individually with each user/pass or chown them to the appropriate user.

Nope, just straight up plain files. even Just an index.php file with simple html errors will yield problems.

He did say I could edit files via command line, but.. im not quite sure how to do that efficiently. I like to use editplus 3 for code editing, im guessing ssh doesnt support external file editors
 
If you're talking about 'root' user of the system, which you should never want to log in as, find out what user the web server runs under (apache, www, etc.) and chown all the files to that.
 
I've got several different ip's on my dedicated server running WHM/Cpanel - each with it's own user/pass but all I need to do is log in as root and am able to access and modify all of them. Just use something like WinSCP using sftp and navigate to whatever account you need to work on like sloop said above (/home/%username%/public_html/)
If that's not working for you, check with your host to have them modify your permissions.
 
why would you not want to log in as root on your own box?

If you're talking about 'root' user of the system, which you should never want to log in as, find out what user the web server runs under (apache, www, etc.) and chown all the files to that.
 
I've got several different ip's on my dedicated server running WHM/Cpanel - each with it's own user/pass but all I need to do is log in as root and am able to access and modify all of them. Just use something like WinSCP using sftp and navigate to whatever account you need to work on like sloop said above (/home/%username%/public_html/)
If that's not working for you, check with your host to have them modify your permissions.

so youre saying you log in as root with any one of your accounts, it doesnt matter which one, and you can modify php files (without protocol errors) on any of your other accounts?

I use filezilla with sftp. I will try that method, although that is what I originally did, and they told me I needed to log in with THAT ftp account, not with just any of them.

I will check again though
 
if you're really running the script from root you should be able to do what sloop said and edit the files from the paths. If not then the files need global permissions set to write. cpanel isn't doing anything more than what would be advisable under normal security settings anyways so to blame it is kind of shooting yourself in the foot.
 
instead of using 'www.domain.com' as your server, use the ip address that you set up the dedicated box with.

example:

box is created with 00.00.000.1

all domain accounts, regardless of ip's added after that, should show up under /home/

so if you have 10 other accounts each with a different domain like this:

00.00.000.1
00.00.000.2
00.00.000.3
00.00.000.4
00.00.000.5
00.00.000.6
00.00.000.7

They should all be accessible logging into 00.00.000.1 with username: root and show up under /home/


so youre saying you log in as root with any one of your accounts, it doesnt matter which one, and you can modify php files (without protocol errors) on any of your other accounts?

I use filezilla with sftp. I will try that method, although that is what I originally did, and they told me I needed to log in with THAT ftp account, not with just any of them.

I will check again though
 
why would you not want to log in as root on your own box?

If you're physically at the terminal or it's isolated in your own subnet, it's OK. If it's remote and you have no other choice, I guess you have no choice, make sure it's SSH so you're not transmitting plaintext.

Otherwise, instead of:

login: "aaaaa"
password:"00000"

login: "aaaaa"
password: "00001"
...


it's:

login: "root"
password: "00000"

login: "root"
password: "00001"
...

and instead of just compromising a portion of the system, it's the whole thing.

Not to mention, if you're running as root and make a bunch of files, etc., when you login as someone else, you usually can't do shit with the files.
 
I always user SFTP, is that effectively the same as SSH, but using a GUI like WinSCP, rather than command line?