• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 610
  • Last Modified:

Webmin 1.5 cannot run lcd command within a script

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
vanquisbank
Asked:
vanquisbank
  • 2
1 Solution
 
ValutusCommented:
have you tried putting the path in quotes i.e. lcd "/FolderA/Outgoing" ?
0
 
vanquisbankAuthor Commented:
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
 
ValutusCommented:
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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now