how do you upload files to the server using root access

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
As with the /backend.php script in the other thread, and others to where you need to upload files/images/ etc to the server using root access - how do you guys do that?

I've been using putty for all the config and text stuff, but I'm wanting to try out that backup.php in the /usr/local/cpanel/whostmgr/docroot/ directory, and i'm also wanting to make a new cpanel theme and seem to need to be able to upload images and stuff, yet I just don't know how to do that.

Like what do you guys use to do that kinda stuff? Any trade secrets that I haven't learned? Thanks much guys...
 

XPerties

Well-Known Member
Apr 10, 2003
401
0
166
New Jersey, USA
Because I disable all my servers with root login and force admin right to su - first I haven't found any FTP app that supports su - to root.

What I do is just upload the files I need to a an account ont he server and mv filename to directory I want it in.
 

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
in putty.. i have to log in with
"main-account-username"
"main-account-password"

THEN i can "su -"
then "root password"


So.. I've tried with ws_ftp but I don't know how to get in that way. I suppose I could do what you do and upload to our main dir then mv folder over... eh... just sounds like the hard way... lol... thanks for your insight though...

anybody else?
 

sawbuck

Well-Known Member
Jan 18, 2004
1,365
10
168
cPanel Access Level
Root Administrator
You can enable an alternate port and run a second ssh daemon that only accepts connections via public key authetication. Then using an app like, Private Shell or others, you can sftp to/from root.
 

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
holy crap... that sounds awesome... but... I have no frickin idea what you just said... lol...

uh... I'm not sure how to create a new port and do all that...


What about WinSCP? its free! :rolleyes:
http://sourceforge.net/projects/winscp/
WinSCP is a SFTP and SCP client for Windows using SSH. Its main function is secure copying of files between a local and a remote computer.
 
Last edited:

sawbuck

Well-Known Member
Jan 18, 2004
1,365
10
168
cPanel Access Level
Root Administrator
Well credit goes to Chirpy on the forum for helping me sort this out. Kind of busy at the moment due to upcoming holidays but can post the help he gave me if you have some time. You might want to research how to generate key authentication if you are using putty or check some of the other non free ssh client options. Have particularly liked Private Shell which Chirpy recommended. http://www.privateshell.com/
 

richy

Well-Known Member
Jun 30, 2003
275
1
168
I just upload to a normal Cpanel FTP account and then just "mv /home/xxxx/dropspace/* /where/ever"
 
  • Like
Reactions: davellan

sawbuck

Well-Known Member
Jan 18, 2004
1,365
10
168
cPanel Access Level
Root Administrator
ryno267 said:
What about WinSCP? its free!
True, but you won't be able to use the gui sftp functions to root accessible directories. Does have built in putty support though. The extra denaro for a client like Private Shell was well worth it for us. Just got tired of moving/backing up multiple files from the command line.