Re: windows 7 create directory with read write execute permission for everybody
* Gelonida (Mon, 27 Jun 2011 11:32:45 +0200) > One thing, which I would still like to know (though I don't need it > for my current task) is what to do to to setup an ACE on a directory, > such, that all entries below will inherit the directory's access > settings. Such a thing does not exist. Thorsten -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
On 2011.06.26 03:57 PM, Gelonida wrote: > 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. This may not require pywin32 - by default there's a public directory at os.environ['public'] (usually C:\Users\Public), at least in Vista and 7. There's probably a similar directory in earlier versions of Windows, but I don't know where they are (might still be os.environ['public']). > Alternatively it would be even better to specify exactly which users > should be allowed to access the directory tree. This will definitely require pywin32. -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
Hi Tim, On 6/27/2011 9:39 AM, Tim Golden wrote: On 26/06/2011 21: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. . . . I never used / modified Windows file permissions except once or twice via explorer. I'm thus a little shaky with Microsoft's file permissions. Have a look at this to see if takes you anywhere: http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html That's exactly the kind of link I was looking for. Thanks a lot. For the current existing code I can just replace all open(fname, "w") calls with a custom wrapper and I should be fine. One thing, which I would still like to know (though I don't need it for my current task) is what to do to to setup an ACE on a directory, such, that all entries below will inherit the directory's access settings. I will look into this lateron. -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
On 26/06/2011 21: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. 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. Have a look at this to see if takes you anywhere: http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html TJG -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
* 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
Hi! +1 Gelonida confuses "Windows permissions" and "NTFS's rights". (too) Many Windows users are unfamiliar with Windows. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
* 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
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. -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
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 -- http://mail.python.org/mailman/listinfo/python-list
windows 7 create directory with read write execute permission for everybody
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. -- http://mail.python.org/mailman/listinfo/python-list