Score:0

.listing: Permission denied when downloading data via ftp

cn flag

I have a problem to download data via ftp. I am completely hazy about ftp.

I am trying to get data via wget 'ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*.gz'

Even though I set anonymous_enable=YES, local_enable=YES , write_enable=YES in vsftpd.conf, I encounter the error below. Can someone help me how to figure out the error?

Thanks

--2022-10-24 08:57:21-- ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*.gz => ‘.listing’ Resolving ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)... 130.14.250.13, 165.112.9.228, 2607:f220:41f:250::230, ... Connecting to ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)|130.14.250.13|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD (1) /blast/db ... done. ==> PASV ... done. ==> LIST ... done. .listing: Permission denied

David avatar
cn flag
What ever site you are trying to access they have not given you permission to download. You need to contact them. Not a problem at the local end.
Score:1
in flag

In which directory are you trying to use wget? Are you sure you have permission to write to that directory?

When I run wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*.gz (without the quotes) from the Terminal, it downloads several gigabytes just fine. The first item that will be saved, though, is a file called .listing, which contains all of the files in the source directory that you are downloading from. If you are trying to use wget from a directory where you do not have permission to save files. .listing will not be written and the wget command will fail with a .listing: Permission denied error.

As a test, try this:

  1. Open Terminal (if it's not already open) or connect to the machine that is going to use wget via SSH (if not already connected)
  2. Make sure you're in the home directory for your account:
    cd ~
    
  3. Create a directory for all this data:
    mkdir nih 
    
  4. Change to that directory:
    cd nih 
    
  5. Run the wget command:
    wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*.gz 
    

You should see something like this:

--2022-10-24 06:57:07--  ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt*.gz
           => ‘.listing’
Resolving ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)... 2607:f220:41f:250::229, 2607:f220:41f:250::230, 130.14.250.10, ...
Connecting to ftp.ncbi.nlm.nih.gov (ftp.ncbi.nlm.nih.gov)|2607:f220:41f:250::229|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /blast/db ... done.
==> EPSV ... done.    ==> LIST ... done.

.listing                                    [    <=>                                                                         ]  70.75K  42.3KB/s    in 1.7s    

2022-10-24 06:57:18 (42.3 KB/s) - ‘.listing’ saved [72451]

Removed ‘.listing’.
--2022-10-24 06:57:18--  ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt.00.tar.gz
           => ‘nt.00.tar.gz’
==> CWD not required.
==> EPSV ... done.    ==> RETR nt.00.tar.gz ... done.
Length: 4365255023 (4.1G)

nt.00.tar.gz                              2%[>                                                                               ]  96.27M  4.26MB/s    eta 13m 39s
Seda KOLDAS avatar
cn flag
I guess, you are right I didn't have permission to write to my directory because I tried again with your way and got same error, on the other hand, I used ftp link with sudo wget and it worked.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.