Solved

Webmin 1.5 cannot run lcd command within a script

Posted on 2010-08-13
3
593 Views
Last Modified: 2013-12-01
Hi all,

I am using a ubuntu 9.4 server as ftps server. We have scripts that transfer files to our customers and it is scheduled by a cron job via webmin 1.510. Here is a sample of my script


Code:
psftp user@hostname
lcd /FolderA/Outgoing
cd FolderREm
mput *
When I run a cron job manually the webmin is returning the below error
1) psftp> psftp: unknown command "tgoing"

and then it is sending all files located in /usr/share/webmin/cron directory to the customer.
Could you help me or direct how
a) resolve why webmin cannot lcd
b) If webmin encounters erros it should sent files from FolderD: a specific folder I will create.

Thanks for your help
0
Comment
Question by:vanquisbank
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Valutus earned 500 total points
ID: 33428140
have you tried putting the path in quotes i.e. lcd "/FolderA/Outgoing" ?
0
 

Author Comment

by:vanquisbank
ID: 33428303
Hi valutus,

Thanks for the quick reply and that resolve my questions.
I have another 30 send scripts that do not uses quotes and working fine.
0
 
LVL 4

Expert Comment

by:Valutus
ID: 33428332
Its a good idea to get into a habit of enclosing paths in quotes.  It saves you from experiencing issues 99% of the time.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Replication has always been one of those technologies that people run scared from. The main reason is usually cost. When you think of replication, your mind drifts to solutions that replicate from one disk frame to another using block level technolo…
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now