I'm experiencing some odd behavior with recursive ftp wgets. In a more recent version, the recursive wget appears to ignore the umask and gives the downloaded files the same permissions as on the remote machine, despite not requesting this via a command line argument.
For example, on machine A (RHEL, wget 1.10.2), I execute the following command: wget -v -nH -A SAO -T 60 -w 1 ftp://ftp.ngdc.noaa.gov/ionosonde/data/AS00Q/individual/2011/121/scaled/ AS00Q_2011121000005.SAO and download the file; the file is mode 664, which corresponds to the umask of 002. If I then add a recursive switch to the command line: wget -v -nH -r -A SAO -T 60 -w 1 ftp://ftp.ngdc.noaa.gov/ionosonde/data/AS00Q/individual/2011/121/scaled/ AS00Q_2011121000005.SAO the directory structure in which the file is created is obviously different, but the file permissions are the same: 664, or rw-rw-r--. Now, I move to machine B, (Ubuntu, wget 1.12) and do the same two commands -- the first without the "-r" flag, and the second with. On the first run, the file downloads with mode 664, agreeing with the umask of 002. When I run the second command, *with* the "-r" flag, in addition to the different directory structure, the file permissions are 444, or r--r--r--, the same as they are on the remote machine. (NOTE: at this point you maybe asking "why are you doing a recursive download, or adding the -A flag, when you're only downloading one file?" In practice, I'm not downloading just one file -- a specific filename won't be present, and the URL will end with the "scaled" subdirectory. I just wanted to include examples that you could try yourself without downloading 100 files.) I need to be able to do recursive downloads while having the file permissions match my umask. Is that no longer possible in more recent versions of wget? Or am I doing something wrong here? Thanks, -c Chris Metzler Naval Research Laboratory, Code 7669 202-767-6166 [email protected]
