LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 11-07-2005, 02:44 PM   #1
csross
Newbie
 
Registered: Mar 2004
Posts: 25
Thanked: 0
ftp from LInux to Serv-U ftp server problem


[Log in to get rid of this advertisement]
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
csross is offline     Reply With Quote
Old 11-07-2005, 03:27 PM   #2
jlightner
Senior Member
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 3,541
Thanked: 144
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.
jlightner is offline     Reply With Quote
Old 11-07-2005, 05:35 PM   #3
csross
Newbie
 
Registered: Mar 2004
Posts: 25
Thanked: 0

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

Thanks
csross is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
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 06:11 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 09:23 AM
ftp to Linux server problem, help. xman Linux - General 4 12-04-2002 09:14 AM
ftp connect to linux server problem,help! xman Linux - General 1 03-10-2001 10:39 AM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration