• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 613
  • 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

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
  • 2
1 Solution
have you tried putting the path in quotes i.e. lcd "/FolderA/Outgoing" ?
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.
Its a good idea to get into a habit of enclosing paths in quotes.  It saves you from experiencing issues 99% of the time.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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