LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-07-2005, 01:44 PM   #1
csross
Newbie
 
Registered: Mar 2004
Posts: 25

Rep: Reputation: 15
ftp from LInux to Serv-U ftp server problem


I am ftping from a linux server to a Windows server running Serv-U Ftp server, and the Serv-U server is set to Active Mode ftp. I have a script that ftps at night from the Redhat server. If I run the script at night in a cron, I get "passive mode not allowed on this server" errors and the files don't transfer. If I execute the same script manually, I don't get the error and the files transfer.

Any suggestions why and is there a command script to run it actively and successivly.

Thanks
 
Old 11-07-2005, 02:27 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
cron is not a standard shell. Many things that will work OK at the command line don't in cron because of this difference. The main reason this occurs is that cron doesn't inherit an environment so some things you don't think about (such as $PATH) may not be defined.

type "echo $PATH" and you'll the paths that are searched when looking for executables. Without this variable even simple commands such as "ls" wouldn't work because it wouldn't know where to find them.

Often for cron scripts you need to insert a PATH variable into the script or just hard code the full path to commands. So if your script now contains "ls" you would need to change it to "/bin/ls". You need to do this for each command used in the script or alternatively set PATH=/bin:/usr/bin: (etc...) so that it knows where to find each of your commands.

And of course PATH is just one of many possible variables. You need to make sure you know what your script is relying on - there may be a config file you need to source.
 
Old 11-07-2005, 04:35 PM   #3
csross
Newbie
 
Registered: Mar 2004
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks. I set up passive mode and allowed those port on the router and it work.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM
ftp to Linux server problem, help. xman Linux - General 4 12-04-2002 08:14 AM
ftp connect to linux server problem,help! xman Linux - General 1 03-10-2001 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration