os.mkdir and mode

Godson godson.g at gmail.com
Sat Dec 2 02:56:34 EST 2006


On 1 Dec 2006 23:17:50 -0800, vj <vinjvinj at gmail.com> wrote:
>
> How do I do the following unix command:
>
> mkdir -m770 test
>
> with the os.mkdir command. Using os.mkdir(mode=0770) ends with the
> incorrect permissions.
>
> Thanks,
>
> VJ
>
> --
> http://mail.python.org/mailman/listinfo/python-list




using

 os.mkdir("/home/godson/test",0770)

Allows me to do that with out any trouble, and also please check whether you
have appropriate permission to the area where you are trying to create the
folder. os.mkdir takes no keyword arguments, if you dont have appropriate
permissions you can try running python as super user, or user with proper
permissions.

Godson Gera
http://godson.auroinfo.com  <http://godson.auroinfo.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061202/fa34770d/attachment.html>


More information about the Python-list mailing list