Solved

Webmin 1.5 cannot run lcd command within a script

Posted on 2010-08-13
3
596 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
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…

828 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