Monday, August 27, 2007

A problem with wget on OpenSolaris

Ok, here is a stupid little problem.I waisted an hour trying to figure this one out. Maybe this will help someone to avoid the same mistake!

I was using 'wget' to try to download a file from a http server onto my OpenSolaris PC. Here is what I did:
# uname -a
SunOS solaris 5.11 snv_60 i86pc i386 i86pc
# wget -V
GNU Wget 1.10.2
# cd /home
# /usr/sfw/bin/wget
=> `index.htm'
Connecting to|NNN.NNN.NNN.NNN|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11,774 (11K) [text/html]
index.htm: Operation not applicable
Cannot write to `index.htm' (Operation not applicable).

Did you spot my mistake?
I must have thought I was using a Linux PC, because then the '/home' directory would have been fine. But on Solaris...
# ls -ld /home
dr-xr-xr-x 1 root root 1 Apr 18 00:03 /home cannot write to that directory.
Choose a directory that is writeable, and then wget will work without error.

No comments: