Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82209 > unrolled thread
| Started by | "ishish" <ishish@1:249/999.remove-cdt-this> |
|---|---|
| First post | 2014-12-09 11:32 -0500 |
| Last post | 2014-12-09 11:32 -0500 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.python
Re: why can't download file from linux server into local window disk =? "ishish" <ishish@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
Re: why can't download file from linux server into local window disk c: "Luuk" <luuk@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
Re: why can't download file from linux server into local window disk c: "Chris Angelico" <chris.angelico@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
Re: why can't download file from linux server into local window disk c: "Thomas Rachel" <thomas.rachel@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
Re: why can't download file from linux server into local window disk c: "Tim Chase" <tim.chase@1:249/999.remove-cdt-this> - 2014-12-09 11:32 -0500
| From | "ishish" <ishish@1:249/999.remove-cdt-this> |
|---|---|
| Date | 2014-12-09 11:32 -0500 |
| Subject | Re: why can't download file from linux server into local window disk =? |
| Message-ID | <54866F2E.1747.complang@piz.noip.com> |
> with open(localpath, 'wb') as fl: > PermissionError: [Errno 13] Permission denied: 'c:' I remember gloomily (haven't used windows since ages) that newer Windows versions don't like users to write directly to C:. Have you tried to save the file to your Documents folder? Regards, Alba --- SoupGate-Win32 v1.05 * Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999) --- Synchronet 3.15b-Win32 NewsLink 1.92 SpaceSST BBS Usenet <> Fidonet Gateway
[toc] | [next] | [standalone]
| From | "Luuk" <luuk@1:249/999.remove-cdt-this> |
|---|---|
| Date | 2014-12-09 11:32 -0500 |
| Subject | Re: why can't download file from linux server into local window disk c: |
| Message-ID | <54866F2E.1748.complang@piz.noip.com> |
| In reply to | #82209 |
To: ishish On 8-12-2014 18:37, ishish wrote: >> with open(localpath, 'wb') as fl: >> PermissionError: [Errno 13] Permission denied: 'c:' > > I remember gloomily (haven't used windows since ages) that newer Windows > versions don't like users to write directly to C:. Have you tried to > save the file to your Documents folder? > > Regards, > Alba no, it's the ssh-server denying a log on from 'root' --- SoupGate-Win32 v1.05 * Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999) --- Synchronet 3.15b-Win32 NewsLink 1.92 SpaceSST BBS Usenet <> Fidonet Gateway
[toc] | [prev] | [next] | [standalone]
| From | "Chris Angelico" <chris.angelico@1:249/999.remove-cdt-this> |
|---|---|
| Date | 2014-12-09 11:32 -0500 |
| Subject | Re: why can't download file from linux server into local window disk c: |
| Message-ID | <54866F2E.1749.complang@piz.noip.com> |
| In reply to | #82210 |
To: Luuk Copy: python-list@python.org (python-list@python.org) On Tue, Dec 9, 2014 at 5:11 AM, Luuk <luuk34@gmail.com> wrote: > On 8-12-2014 18:37, ishish wrote: >>> >>> with open(localpath, 'wb') as fl: >>> PermissionError: [Errno 13] Permission denied: 'c:' >> >> >> I remember gloomily (haven't used windows since ages) that newer Windows >> versions don't like users to write directly to C:. Have you tried to >> save the file to your Documents folder? >> >> Regards, >> Alba > > > no, it's the ssh-server denying a log on from 'root' It looks to me more like an issue with path naming. Try 'c:/' instead of 'c:', or use '/' to mean the root directory of the current drive. Alternatively, do a web search for the problem and the symptoms, as you're unlikely to be the first person to have run into this. ChrisA --- SoupGate-Win32 v1.05 * Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999) --- Synchronet 3.15b-Win32 NewsLink 1.92 SpaceSST BBS Usenet <> Fidonet Gateway
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Rachel" <thomas.rachel@1:249/999.remove-cdt-this> |
|---|---|
| Date | 2014-12-09 11:32 -0500 |
| Subject | Re: why can't download file from linux server into local window disk c: |
| Message-ID | <54866F2E.1756.complang@piz.noip.com> |
| In reply to | #82210 |
Am 08.12.2014 19:11 schrieb Luuk:
> no, it's the ssh-server denying a log on from 'root'
You are repating yourself.
How could possibly
with open(localpath, 'wb') as fl:
PermissionError: [Errno 13] Permission denied: 'c:'
be a problem with the SSH server?
--- SoupGate-Win32 v1.05
* Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999)
--- Synchronet 3.15b-Win32 NewsLink 1.92
SpaceSST BBS Usenet <> Fidonet Gateway
[toc] | [prev] | [next] | [standalone]
| From | "Tim Chase" <tim.chase@1:249/999.remove-cdt-this> |
|---|---|
| Date | 2014-12-09 11:32 -0500 |
| Subject | Re: why can't download file from linux server into local window disk c: |
| Message-ID | <54866F2E.1757.complang@piz.noip.com> |
| In reply to | #82210 |
To: Luuk
Copy: python-list@python.org
On 2014-12-08 19:11, Luuk wrote:
> On 8-12-2014 18:37, ishish wrote:
> >> with open(localpath, 'wb') as fl:
> >> PermissionError: [Errno 13] Permission denied: 'c:'
> >
> > I remember gloomily (haven't used windows since ages) that newer
> > Windows versions don't like users to write directly to C:. Have
> > you tried to save the file to your Documents folder?
> >
> > Regards,
> > Alba
>
> no, it's the ssh-server denying a log on from 'root'
I'm going to go out on a limb and say that's pretty clearly not the
issue. The exception states that the problem is one of permissions
on the C:
PermissionError: [Errno 13] Permission denied: 'c:'
which ishish clearly identified as a "Windows doesn't let you do that
any more" issue. Additionally, I don't know off the top of my if the
Paramiko libraries expect a file-name, or if they expect a directory
into which the file gets put based on the server-side name.
The best solution is to do as ishish proposed: write the file to some
other appropriate (i.e., writable) location. A simple fix might be
import os
# ...
localpath = os.path.expanduser('~')
or
localpath = os.path.join(
os.path.expanduser('~'),
'passwd.txt',
)
A stop-gap solution might be to just run the program in a writable
directory:
c:\> cd %TEMP%
c:\...\TEMP> python myprog.py
A far worse solution would be to run the script as Administrator on
the Win32 box, which will grant permission to write in the root of C:
-tkc
--- SoupGate-Win32 v1.05
* Origin: <SpaceSST.BBS.Fidonet<>NNTP.gateway.@.piz.noip.me> (1:249/999)
--- Synchronet 3.15b-Win32 NewsLink 1.92
SpaceSST BBS Usenet <> Fidonet Gateway
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web