Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8483 > unrolled thread

windows 7 create directory with read write execute permission for everybody

Started byGelonida <gelonida@gmail.com>
First post2011-06-26 22:57 +0200
Last post2011-06-27 11:46 +0200
Articles 9 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  windows 7 create directory with read write execute permission for everybody Gelonida <gelonida@gmail.com> - 2011-06-26 22:57 +0200
    Re: windows 7 create directory with read write execute permission for everybody Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2011-06-26 23:24 +0200
      Re: windows 7 create directory with read write execute permission for everybody Gelonida <gelonida@gmail.com> - 2011-06-26 23:53 +0200
      Re: windows 7 create directory with read write execute permission for everybody Gelonida <gelonida@gmail.com> - 2011-06-26 23:53 +0200
        Re: windows 7 create directory with read write execute permission for everybody Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2011-06-27 00:34 +0200
        Re: windows 7 create directory with read write execute permission   for everybody Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-27 07:58 +0200
    Re: windows 7 create directory with read write execute permission for   everybody Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-27 07:21 +0200
      Re: windows 7 create directory with read write execute permission for everybody "Michel Claveau - MVP"<enleverLesX_XXmcX@XmclavXeauX.com.invalid> - 2011-06-27 07:36 +0200
      Re: windows 7 create directory with read write execute permission for everybody Gelonida <gelonida@gmail.com> - 2011-06-27 11:46 +0200

#8483 — windows 7 create directory with read write execute permission for everybody

FromGelonida <gelonida@gmail.com>
Date2011-06-26 22:57 +0200
Subjectwindows 7 create directory with read write execute permission for everybody
Message-ID<mailman.432.1309121909.1164.python-list@python.org>
Hi,

What do I have to do under python windows to create a directory with all 
permissions, such, that new files / directories created below will 
inherit the permissions.


The reason I am asking is, that I'd like to create a directory structure 
where multiple users should be allowed to read / write / create files 
and directories.


Alternatively it would be even better to specify exactly which users 
should be allowed to access the directory tree.

I never used / modified Windows file permissions except once or twice 
via explorer. I'm thus a little shaky with Microsoft's file permissions.

Thanks in advance for your answer.

[toc] | [next] | [standalone]


#8484

FromIrmen de Jong <irmen.NOSPAM@xs4all.nl>
Date2011-06-26 23:24 +0200
Message-ID<4e07a374$0$4362$e4fe514c@news.xs4all.nl>
In reply to#8483
On 26-6-2011 22:57, Gelonida wrote:
> Hi,
> 
> What do I have to do under python windows to create a directory with all permissions,
> such, that new files / directories created below will inherit the permissions.
> 
> 
> The reason I am asking is, that I'd like to create a directory structure where multiple
> users should be allowed to read / write / create files and directories.

Isn't this the default when you create a new directoy in Windows? (unless you're
creating it in some location where access is restricted, for instance C:\ or c:\program
files).  I'd try os.mkdir first in any case and check if it does the job.


> Alternatively it would be even better to specify exactly which users should be allowed
> to access the directory tree.

Sorry, can't help you with this. I guess you'll need to use the windows extensions for
Python here and deal with user accounts and ACL's.

Irmen

[toc] | [prev] | [next] | [standalone]


#8485

FromGelonida <gelonida@gmail.com>
Date2011-06-26 23:53 +0200
Message-ID<mailman.433.1309125214.1164.python-list@python.org>
In reply to#8484
On 6/26/2011 11:24 PM, Irmen de Jong wrote:
> On 26-6-2011 22:57, Gelonida wrote:
>> Hi,
>>
>> What do I have to do under python windows to create a directory with all permissions,
>> such, that new files / directories created below will inherit the permissions.
>>
>> The reason I am asking is, that I'd like to create a directory structure where multiple
>> users should be allowed to read / write / create files and directories.
>
> Isn't this the default when you create a new directoy in Windows? (unless you're
> creating it in some location where access is restricted, for instance C:\ or c:\program
> files).  I'd try os.mkdir first in any case and check if it does the job.
>
Have to check when I'm back to the machine in question.

On this machine I used os.mkdir() / os.makedirs() and I had permission 
problems , but only on Windows7. This is why I was asking the question.

I expect, that the win32 libraries might have function calls allowing to 
control the permissions of a directory, but I am really bad with win32 
as I worked mostly with Linux or code, that was platform independent, 
which Windows file permission handling is not :-( .



>
>> Alternatively it would be even better to specify exactly which users should be allowed
>> to access the directory tree.
>
> Sorry, can't help you with this. I guess you'll need to use the windows extensions for
> Python here and deal with user accounts and ACL's.

Yep I'm afraid that's the way to go and where I hoped somebody would 
have a few tiny example lines or pointers to the functions in question 
to be used.


[toc] | [prev] | [next] | [standalone]


#8486

FromGelonida <gelonida@gmail.com>
Date2011-06-26 23:53 +0200
Message-ID<mailman.434.1309125223.1164.python-list@python.org>
In reply to#8484
On 6/26/2011 11:24 PM, Irmen de Jong wrote:
> On 26-6-2011 22:57, Gelonida wrote:
>> Hi,
>>
>> What do I have to do under python windows to create a directory with all permissions,
>> such, that new files / directories created below will inherit the permissions.
>>
>> The reason I am asking is, that I'd like to create a directory structure where multiple
>> users should be allowed to read / write / create files and directories.
>
> Isn't this the default when you create a new directoy in Windows? (unless you're
> creating it in some location where access is restricted, for instance C:\ or c:\program
> files).  I'd try os.mkdir first in any case and check if it does the job.
>
Have to check when I'm back to the machine in question.

On this machine I used os.mkdir() / os.makedirs() and I had permission 
problems , but only on Windows7. This is why I was asking the question.

I expect, that the win32 libraries might have function calls allowing to 
control the permissions of a directory, but I am really bad with win32 
as I worked mostly with Linux or code, that was platform independent, 
which Windows file permission handling is not :-( .



>
>> Alternatively it would be even better to specify exactly which users should be allowed
>> to access the directory tree.
>
> Sorry, can't help you with this. I guess you'll need to use the windows extensions for
> Python here and deal with user accounts and ACL's.

Yep I'm afraid that's the way to go and where I hoped somebody would 
have a few tiny example lines or pointers to the functions in question 
to be used.



[toc] | [prev] | [next] | [standalone]


#8487

FromIrmen de Jong <irmen.NOSPAM@xs4all.nl>
Date2011-06-27 00:34 +0200
Message-ID<4e07b410$0$4357$e4fe514c@news.xs4all.nl>
In reply to#8486
On 26-6-2011 23:53, Gelonida wrote:
> 
> Yep I'm afraid that's the way to go and where I hoped somebody would have a few tiny
> example lines or pointers to the functions in question to be used.

Maybe this is a bit of a help:
http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html

Irmen

[toc] | [prev] | [next] | [standalone]


#8491 — Re: windows 7 create directory with read write execute permission for everybody

FromThorsten Kampe <thorsten@thorstenkampe.de>
Date2011-06-27 07:58 +0200
SubjectRe: windows 7 create directory with read write execute permission for everybody
Message-ID<MPG.28723a7c5f3ef634989826@news.individual.de>
In reply to#8486
* Gelonida (Sun, 26 Jun 2011 23:53:15 +0200)
> On this machine I used os.mkdir() / os.makedirs() and I had permission 
> problems , but only on Windows7.

Windows file permissions haven't changed since 1995. The only addition 
was dynamic inheritance support back in 2000.

> I expect, that the win32 libraries might have function calls allowing
> to control the permissions of a directory, but I am really bad with
> win32 as I worked mostly with Linux or code, that was platform
> independent, which Windows file permission handling is not :-( .

Even Linux file systems have ACL support. It's only that few people use 
it since application support is sparse. And it lacks (dynamic) 
inheritance which is so 1980s.

Thorsten

[toc] | [prev] | [next] | [standalone]


#8488 — Re: windows 7 create directory with read write execute permission for everybody

FromThorsten Kampe <thorsten@thorstenkampe.de>
Date2011-06-27 07:21 +0200
SubjectRe: windows 7 create directory with read write execute permission for everybody
Message-ID<MPG.287231d03e7c6be8989825@news.individual.de>
In reply to#8483
* Gelonida (Sun, 26 Jun 2011 22:57:57 +0200)
> What do I have to do under python windows to create a directory with
> all permissions, such, that new files / directories created below will
> inherit the permissions.

Exactly nothing (except creating the directory, of course).

> The reason I am asking is, that I'd like to create a directory
> structure where multiple users should be allowed to read / write /
> create files and directories.
> 
> Alternatively it would be even better to specify exactly which users
> should be allowed to access the directory tree.
> 
> I never used / modified Windows file permissions except once or twice
> via explorer. I'm thus a little shaky with Microsoft's file
> permissions.

Microsoft's permission handling hasn't changed in the last eleven years. 
So you had a lot of time to learn about it. Do you see this "Learn about 
access control and permissions" link when you're in the security tab? 
Just click on it.

Thorsten

[toc] | [prev] | [next] | [standalone]


#8489

From"Michel Claveau - MVP"<enleverLesX_XXmcX@XmclavXeauX.com.invalid>
Date2011-06-27 07:36 +0200
Message-ID<4e0816db$0$14692$ba4acef3@reader.news.orange.fr>
In reply to#8488
Hi!

+1

Gelonida confuses "Windows permissions" and "NTFS's rights".
(too) Many Windows users are unfamiliar with Windows.

@-salutations
-- 
Michel Claveau

[toc] | [prev] | [next] | [standalone]


#8500

FromGelonida <gelonida@gmail.com>
Date2011-06-27 11:46 +0200
Message-ID<mailman.443.1309168035.1164.python-list@python.org>
In reply to#8488
On 6/27/2011 7:21 AM, Thorsten Kampe wrote:
> * Gelonida (Sun, 26 Jun 2011 22:57:57 +0200)
>> What do I have to do under python windows to create a directory with
>> all permissions, such, that new files / directories created below will
>> inherit the permissions.
>
> Exactly nothing (except creating the directory, of course).
:-) I thought so as well.

I asume the security settings of the directory below which I created 
mine were setup to give no write permission to Everybody.

If I changed the parent directories security settings with the explorer 
everything behaved fine.

So if the parent directories security settings are unknown it seems 
mkdir() is not sufficient and I have to use some win32 calls
as mentioned in the url of Tim's reply to have the correct settings.

http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html


>
>> The reason I am asking is, that I'd like to create a directory
>> structure where multiple users should be allowed to read / write /
>> create files and directories.
>>
>> Alternatively it would be even better to specify exactly which users
>> should be allowed to access the directory tree.
>>
>> I never used / modified Windows file permissions except once or twice
>> via explorer. I'm thus a little shaky with Microsoft's file
>> permissions.
>
> Microsoft's permission handling hasn't changed in the last eleven years.
> So you had a lot of time to learn about it.
but never the need so far.

 > Do you see this "Learn about
> access control and permissions" link when you're in the security tab?
> Just click on it.
Will click

>
> Thorsten


[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web