0

I know how to create a folder with certain permissions like this:

import os
os.mkdir('test',0o550)

But what if I want to only assign access to specific groups or users?

Thanks in advance!

Dance Party2
  • 7,214
  • 17
  • 59
  • 106

1 Answers1

0

Use os.chown() on the directory afterwords for unix/linux, for windows the win32security module of pywin32

Community
  • 1
  • 1
  • Thanks. It says "Availability: Unix." under that section, though. Will it still work somehow? – Dance Party2 Jan 13 '17 at 22:17
  • I should have noticed the tag (Edit: And the title.. ugh), you may need win32security as [explained here](http://stackoverflow.com/questions/12168110/setting-folder-permissions-in-windows-using-python). – Anthony Forsberg Jan 13 '17 at 22:41