Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18295
| Date | 2012-01-01 15:05 +0000 |
|---|---|
| From | Tim Golden <mail@timgolden.me.uk> |
| Subject | Re: Can't write to a directory made w/ os.makedirs |
| References | <50693cc2-93c9-481d-9fb1-42312e69b2d9@c42g2000prb.googlegroups.com> <mailman.4289.1325410678.27778.python-list@python.org> <91830ffb-00d9-4fd1-b771-ad59374334ec@n22g2000prh.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4292.1325430363.27778.python-list@python.org> (permalink) |
On 01/01/2012 12:05, David Goldsmith wrote: >> ie can the Python process creating the directories, > > Yes. > >> and a subprocess called from it create a simple file? > > No. > >> Depending on where you are in the filesystem, it may indeed >> be necessary to be running as administrator. But don't try >> to crack every security nut with an elevated sledgehammer. > > If you mean running as admin., those were my sentiments exactly. So, > there isn't something specific I should be doing to assure that my > subproceses can write to directories? In the general case, no. By default, a subprocess will have the same security context as its parent. The exception is where the parent (the Python processing invoking subprocess.call in this example) is already impersonating a different user; in that case, the subprocess will inherit its grandparent's context. But unless you're doing something very deliberate here then I doubt if that's biting you. Can I ask: are you absolutely certain that the processes you're calling are doing what you think they are and failing where you think they're failing? TJG
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Windows 7, Python 2.6] Can't write to a directory made w/ os.makedirs OlyDLG <d.l.goldsmith@gmail.com> - 2011-12-31 14:13 -0800
Re: [Windows 7, Python 2.6] Can't write to a directory made w/ os.makedirs Tim Golden <mail@timgolden.me.uk> - 2012-01-01 09:37 +0000
Re: Can't write to a directory made w/ os.makedirs David Goldsmith <eulergaussriemann@gmail.com> - 2012-01-01 04:05 -0800
Re: Can't write to a directory made w/ os.makedirs Tim Golden <mail@timgolden.me.uk> - 2012-01-01 15:05 +0000
Re: Can't write to a directory made w/ os.makedirs David Goldsmith <eulergaussriemann@gmail.com> - 2012-01-01 19:14 -0800
Re: Can't write to a directory made w/ os.makedirs MRAB <python@mrabarnett.plus.com> - 2012-01-02 03:43 +0000
Re: Can't write to a directory made w/ os.makedirs David Goldsmith <eulergaussriemann@gmail.com> - 2012-01-03 07:17 -0800
Re: Can't write to a directory made w/ os.makedirs Tim Golden <mail@timgolden.me.uk> - 2012-01-02 11:11 +0000
Re: Can't write to a directory made w/ os.makedirs Dave Angel <d@davea.name> - 2012-01-02 09:09 -0500
Re: Can't write to a directory made w/ os.makedirs David Goldsmith <eulergaussriemann@gmail.com> - 2012-01-02 18:34 -0800
csiph-web