?
Solved

Webmin 1.5 cannot run lcd command within a script

Posted on 2010-08-13
3
Medium Priority
?
601 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Valutus earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Suggested Courses

764 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