cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1324
Views
0
Helpful
5
Replies

Cisco FTP Directory Probelm

Ali Hazim
Level 1
Level 1

Hi Everyone,

I'm having a problem when using FTP to backup my devices' config files, the problem is that I can't copy the config file to a certain directory within the FTP server, for example the following command won't work:

 

#copy nvram:startup-config ftp://x.x.x.x/dir1/dir2/dir3/"Config-File"

 

It will only accept the command in the following form:

 

#copy nvram:startup-config ftp://x.x.x.x

 

the problem is that the above command won't save the file to the directory that I want, it will save it in the main directory.

Please note that I know if use the command (#copy nvram:startup-config ftp://x.x.x.x) and press enter, I can then specify the desired directory, but that won't help me because I won't to use kron to send the backup every day in all of my devices.

Also note that I've tried it on different devices and different IOS images and I got the same Result.

 

Thank You

5 Replies 5

balaji.bandi
Hall of Fame
Hall of Fame

Is that FTP have username and password ? or open for any one to upload Files.

 

If you like copy the file to below  folder - dir1/dir2/dir3/"Config-File"

user should have rights to write permission to write the file

 

or change the Root folder of FTP to dir1/dir2/dir3/"Config-File"

 

by the way what FTP Server, what you see the logs when the cisco router try to copy to folder -dir1/dir2/dir3/"Config-File"

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

I have configured the FTP server with username and password using the commands (ip ftp username & ip ftp password).

 

When I try to copy the config file to the FTP server a log message will show up saying (permission denied) even though I made sure that the user has write permission (I also used it with FileZilla and I can write with it).

 

As an Example:

#copy nvram:startup-config ftp://192.168.165.46/home/HalaNOC/Cores/TEST
Address or name of remote host [192.168.165.46]?
Destination filename [home/HalaNOC/Cores/TEST]?
Writing home/HalaNOC/Cores/TEST
%Error opening ftp://192.168.165.46/home/HalaNOC/Cores/TEST (Permission denied)


(The device won't accept that above command because it's a "permission denied), but if I did it as bellow:


#copy nvram:startup-config ftp://192.168.165.46
Address or name of remote host [192.168.165.46]?
Destination filename [sw1]? /home/HalaNOC/Cores/TEST
Writing /home/HalaNOC/Cores/TEST !
7726 bytes copied in 0.052 secs (148577 bytes/sec)

 

(The device will accept it even though it's the same username and password)

 

 

- Check your ftp server's logs too , or use debugging mode . if supported. Then compare successful attempt versus failed attempt , in the ftp-server's logs

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

home/HalaNOC/Cores/TEST

the user need to have rights all the way in the path, not just the folder

 

for each testing - make user home directory home/HalaNOC/Cores/TEST ( give all permission and test it)

 

by the way what FTP Server is this ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hi

 Seems to me as a permission   problem. Do you have permission to write on those directories ? 

Review Cisco Networking for a $25 gift card