Re: Chmod to a group only

2008-12-01 Thread Martin v. Löwis
>> How to chmod a file to: o-rwx ? (to change only the others mode) > I have tried: > > mode = os.stat(fname).st_mode > os.chmod(fname, mode | stat.S_IRWXO) => Changes to o+rwx Close. Try os.chmod(fname, mode & ~stat.S_IRWXO) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-lis

Re: Chmod to a group only

2008-12-01 Thread Peter Otten
Kless wrote: > On 1 dic, 18:17, Kless <[EMAIL PROTECTED]> wrote: >> How to chmod a file to: o-rwx ? (to change only the others mode) >> >> os.chmod(fname, ) >> >> I was reading this [1], but the truth is that anything as 'S_IRUSR' >> doesn't help enought. >> >> [1]http://www.python.org/doc/2.5.2/l

Re: Chmod to a group only

2008-12-01 Thread Kless
On 1 dic, 18:17, Kless <[EMAIL PROTECTED]> wrote: > How to chmod a file to: o-rwx ? (to change only the others mode) > > os.chmod(fname, ) > > I was reading this [1], but the truth is that anything as 'S_IRUSR' > doesn't help enought. > > [1]http://www.python.org/doc/2.5.2/lib/os-file-dir.html I h

Chmod to a group only

2008-12-01 Thread Kless
How to chmod a file to: o-rwx ? (to change only the others mode) os.chmod(fname, ) I was reading this [1], but the truth is that anything as 'S_IRUSR' doesn't help enought. [1] http://www.python.org/doc/2.5.2/lib/os-file-dir.html -- http://mail.python.org/mailman/listinfo/python-list