Welcome, Guest. Please
Login
Home
Help
Search
Login
FAQ
Radified
Ghost.Classic
Ghost.New
Bootable CD
Blog
Radified Community Forums
›
Rad Community Non-Technical Discussion Boards
›
YaBB Forum Software + Rad Web Site
› Magoo - Unix file transfer server-to-server
(Moderators: Rad, Christer, NightOwl, Pleonasm, MrMagoo, El_Pescador)
‹
Previous Topic
|
Next Topic
›
Pages:
1
2
Magoo - Unix file transfer server-to-server (Read 37819 times)
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Magoo - Unix file transfer server-to-server
Dec 11
th
, 2010 at 9:31pm
what's the best way to transfer a file (using the bash command-line) from one server directly to mine?
files on other server here:
http://www.movabletype.org/downloads/stable/
i think there are 2 separate prgms that will do this for me, but i can't recall what they are.
this will save me from having to download the file to my hard drive & then upping it to the site.
i have absoluteb path available for my server .. to the exact folder into which I wanna stick it.
IP Logged
MrMagoo
Übermensch
Offline
Resident Linux Guru
Posts: 1026
Phoenix, AZ (USA)
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #1 -
Dec 12
th
, 2010 at 2:20pm
Just cd to the directory on you server where you want the files and then use wget to download them from moveabletype.
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #2 -
Dec 12
th
, 2010 at 4:35pm
wget, then a space, then the remote directory, then what?
(after i cd to the destination directory)
what is the other command? that will do the same thing.
what if the remote directory is password protected? (it's not.)
IP Logged
MrMagoo
Übermensch
Offline
Resident Linux Guru
Posts: 1026
Phoenix, AZ (USA)
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #3 -
Dec 12
th
, 2010 at 10:58pm
Rad wrote
on Dec 12
th
, 2010 at 4:35pm:
wget, then a space, then the remote directory, then what?
The second argument is where you want to file to download to and the file name you want it to have. Since the default is the working directory, I usually just put "./" (without the quotes) meaning "current working path."
Rad wrote
on Dec 12
th
, 2010 at 4:35pm:
what is the other command? that will do the same thing.
Not sure what you are asking. wget is the best way to download on the command line using the http protocol. You could also use a text based browser if you have one installed. Try "lynx
http://moveabletype.org
"
The other popular way to transfer files between hosts is scp, but it requires ssh access to both machines.
Rad wrote
on Dec 12
th
, 2010 at 4:35pm:
what if the remote directory is password protected? (it's not.)
man wget
--user=user
--password=password
Don't forget about the man pages.
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #4 -
Dec 12
th
, 2010 at 11:27pm
what about curl
http://daniel.haxx.se/docs/curl-vs-wget.html
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #5 -
Dec 12
th
, 2010 at 11:32pm
MrMagoo wrote
on Dec 12
th
, 2010 at 10:58pm:
usually just put "./" (without the quotes) meaning "current working path."
why not just a period without the slash, since a period means 'current directory', no?
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1247608529
IP Logged
Rad.in.UbuntuVM
Radmeister
Offline
Rad in Ubuntu 9.04 Jaunty
Virtual Machine
Posts: 92
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #6 -
Dec 12
th
, 2010 at 11:39pm
test from ubuntu virtual machine.
IP Logged
MrMagoo
Übermensch
Offline
Resident Linux Guru
Posts: 1026
Phoenix, AZ (USA)
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #7 -
Dec 13
th
, 2010 at 3:43am
Rad wrote
on Dec 12
th
, 2010 at 11:27pm:
what about curl
Sure, you could get curl to do what you want.
Rad wrote
on Dec 12
th
, 2010 at 11:32pm:
why not just a period without the slash, since a period means 'current directory', no?
Say the file is named file.tgz. You want the end file name to be "/current/directory/file.tgz" If you're in /current/directory, then . = /current/directory If you just use ., then you are asking the system to name the file /current/directoryfile.tgz, which will cause an error. ./ will get you what you want. Try both and see.
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #8 -
Dec 26
th
, 2010 at 5:20pm
happy to report wget worked just like you said it would.
the installer package never touched my local hard drve. i love the shell.
but .. do you know a way i could change the default directory/file perms? .. during the unzipping?
i'm talking about the modx cms:
http://rtfm.modx.com/display/revolution20/Basic+Installation
they have only a zip .. no tarball, far as i can tell.
since i use suPHP as my default PHP handler, 755 is the desired perm on directories.
but the install (or my server?) .. is setting them all the 775.
the files all decompress (unzip- a filename.zip) with 664.
ths guy says he thinks suPHP likes 644 for files & 755 for directories.
http://modxcms.com/forums/index.php/topic,59059.msg336317.html
do i not need some 'execute' perms in there, somewhere?
happy holidays.
ps - my tech sppt guy at wiredtree says suPHP expects 755 for directories & 655 for files.
755 sounds right for directories but never heard of 655 before for files.
he knows of no way to tweak perms on unzipping.
IP Logged
MrMagoo
Übermensch
Offline
Resident Linux Guru
Posts: 1026
Phoenix, AZ (USA)
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #9 -
Dec 26
th
, 2010 at 10:03pm
You could easily make everything 755 by using chmod. From the top directory of your modx cms, just run: chmod 755 -R *
"*" is the wildcard meaning 'everything'. -R is recursive, which means if it hits a subdirectory, it will also run the same command on that subdirectory.
If you need to be picky about files vs directories, its a little trickier. You could use find. From the parent directory, run:
find ./ -type d -e chmod 755
find ./ -type f -e chmod 644
The first one finds everything in the current path or below with a file type of 'directory' (-type d.) For each match, it executes (-e) the chmod command. The second one is the same except it looks for files with a type "regular file", which will match all your php files, text files, and everything like that. Make sure you cd to the parent directory of modx before you run this command. Running it from the root directory will cause you a *huge* headache.
I don't know of any way to tweak the permissions during unzip, but the command above will let you quickly and easily set it. I would try 644 first for the files. If it turns out you need 655, you can easily change it. You always want to be as restrictive as you can for security reasons.
Rad wrote
on Dec 26
th
, 2010 at 5:20pm:
do i not need some 'execute' perms in there, somewhere?
Maybe not. What you are executing is the PHP interpreter. The interpreter takes a text file (your php files) as input. So as long as the php interpreter has read permission on the php files, it might be ok.
I can certainly dream up a situation where you would need to give execute permission on the files, but it isn't always necessary.
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #10 -
Dec 26
th
, 2010 at 10:36pm
beautiful.
MrMagoo wrote
on Dec 26
th
, 2010 at 10:03pm:
find ./ -type d -e chmod 755
find ./ -type f -e chmod 644
the modx installer has an option to set NEW folder & file perms (which is cool). The default for this opton is 755 & 644.
Here, I'll drop in a screen shot for you.
Bottom line is that I waited until version 06 before attempting an install. I'm not in the mood to become an early adopter. I'll try one more time after setting perms, but if I still have trouble, I'll wait another 3 months.
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #11 -
Dec 26
th
, 2010 at 10:44pm
on the first command, i get error:
invalid predicate '-e'
same thing on the second command.
there's supposed to be a dash before 'type' right?
IP Logged
MrMagoo
Übermensch
Offline
Resident Linux Guru
Posts: 1026
Phoenix, AZ (USA)
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #12 -
Dec 26
th
, 2010 at 11:56pm
Rad wrote
on Dec 26
th
, 2010 at 10:44pm:
invalid predicate '-e'
Sorry, should be '-exec' not '-e'
Rad wrote
on Dec 26
th
, 2010 at 10:44pm:
there's supposed to be a dash before 'type' right?
Yes.
New command would be:
find ./ -type d -exec chmod 755
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #13 -
Dec 27
th
, 2010 at 12:21am
will try now. thanks.
check out last post this thread:
http://forums.cpanel.net/f34/php-files-not-running-my-server-141481.html
what do you think? you agree? dude sounds like he knows wtf he's talking about, no?
he says ths will give you a 500 server error:
Your PHP scripts are incorrectly set to permission 666 or 777
Your folders or higher level folders are incorrectly 666 or 777
Why error for setting perms HIGHER than necessary?
IP Logged
Rad
Radministrator
Offline
Sufferin' succotash
Posts: 4090
Newport Beach, California
Back to top
Re: Magoo - Unix file transfer server-to-server
Reply #14 -
Dec 27
th
, 2010 at 12:35am
oops, almost forgot to cd to modx directory first.
what would happen if i did?
will these commands go to *all* files & directories recursively?
IP Logged
Pages:
1
2
‹
Previous Topic
|
Next Topic
›
« Home
‹ Board
Top of this page
Forum Jump »
Home
» 10 most recent Posts
» 10 most recent Topics
Rad Community Technical Discussion Boards (Computer Hardware + PC Software)
- Norton Ghost 15, 14, 12, 10, 9, + Norton Save + Restore (NS+R)
- Norton Ghost 2003, Ghost v8.x + Ghost Solution Suite (GSS) Discussion Board
- Cloning Programs (Except Norton Ghost)
- NightOwl's Bootable CD/DVD
- PC Hardware + Software (except Cloning programs)
Rad Community Non-Technical Discussion Boards
- The Water Cooler
- YaBB Forum Software + Rad Web Site ««
Radified Community Forums
» Powered by
YaBB 2.4
!
YaBB
© 2000-2009. All Rights Reserved.