mrdokau
04-12-2002, 09:30 AM
I'm no Linux expert, so I need I bit of help.
I need to upload a file to the server whilst logged in as the root. The server is running RedHat 7.2. How do I do this via SSH? What command do I use? if not via SSH, how else do I upload the file?
Any help would be appreciated!
allera
04-12-2002, 10:01 AM
sftp or scp for SSH transfers (rsync works too if you have that).
man sftp
man scp
man rsync
What are you trying to do, specifically? Maybe we can help.
Tim Greer
04-12-2002, 04:35 PM
Originally posted by mrdokau
I'm no Linux expert, so I need I bit of help.
I need to upload a file to the server whilst logged in as the root. The server is running RedHat 7.2. How do I do this via SSH? What command do I use? if not via SSH, how else do I upload the file?
Any help would be appreciated!
I can't think of one reason in the world, of why you would want or need to upload a file while logged in specifically as the root user? Why do you need to do that? Anyway, there's another means to accomplish this, as whatever user (including root), and that is, if you're able anyway, to use wget, ftp, scp, lynx, etc., to simply 'download' the file instead of uploading it.
mrdokau
04-12-2002, 09:43 PM
That's for the suggestions guys.
Here's what I'm trying to do. I have CPanel/WHM installed and need to upload some HTML files to the /root/cpanel3-skel directory.
Seeing I can't FTP into the server as the root to access this directory, I thought the only why to upload files to this directory would be via SSH? Correct me if I'm wrong.
phpjames
04-12-2002, 10:01 PM
Upload the files to one of your FTP sites. Then login via SSH as root and move the files to the skel folder and change the permissions. Your done. ;-)
mrdokau
04-12-2002, 10:12 PM
Great idea! Many thanks....
Tim Greer
04-12-2002, 10:35 PM
Yes, that would be my suggestion. As there's never a need to FTP into a server as root to upload anything. I'd never suggest that, even if you could. You can always log in as root and grab a file *from* somewhere (you can do this as non-root as well), or if you need to upload, to just upload it as a non-priveledged user and su to root to move it and do your duty.
JaysonH
04-13-2002, 03:17 AM
Upload all your files as your normal user, then su to root. As root just type 'cp filename /root/cpanel3-skel' then set correct permissions and BAM, you're done. :)
phpjames
04-13-2002, 06:46 AM
Wow Jayson,
Kinda like I said above. Problem solved. Your Done.
JaysonH
04-13-2002, 07:17 AM
phpjames,
Yep. Just thought I would give him the commands to do it, wasnt sure if he knew them. :P