Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!news.babsi.de!open-news-network.org!news2.open-news-network.org!.POSTED!not-for-mail From: Thomas Rachel Newsgroups: comp.lang.python Subject: Re: why can't download file from linux server into local window disk c:? Date: Mon, 08 Dec 2014 20:36:35 +0100 Organization: A not so newly installed InterNetNews server Lines: 22 Message-ID: References: NNTP-Posting-Host: 2001:41d0:8:4cbf:44:4578:5717:5afe Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news2.open-news-network.org 1418067602 32732 2001:41d0:8:4cbf:44:4578:5717:5afe (8 Dec 2014 19:40:02 GMT) X-Complaints-To: abuse@open-news-network.org NNTP-Posting-Date: Mon, 8 Dec 2014 19:40:02 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Hamster/2.1.0.11 In-Reply-To: Xref: csiph.com comp.lang.python:82139 Am 09.12.2014 09:14 schrieb pengsir: > My vps ip is x.y.z.w ,i want to download /etc/passwd from linux server > into my local window disk c: . > localpath = 'c:' [...] > with open(localpath, 'wb') as fl: > PermissionError: [Errno 13] Permission denied: 'c:' That's completely clear: you are not allowed to create a file named 'c:'. You should replace it with a full path name, such as localpath = 'c:\\passwd' or such. Thomas