[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Mon Feb 28 22:43:36 CET 2011


Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com> added the comment:

A side effect of this patch is that it fixes failure of test_exist_ok_existing_directory() from test_os.py in situation when top-level directory of Python sources has SGID bit set. (test_exist_ok_existing_directory() exists only in Python >=3.2.)

$ chmod g+s .
$ LD_LIBRARY_PATH=$(pwd) ./python Lib/test/test_os.py
...
======================================================================
ERROR: test_exist_ok_existing_directory (__main__.MakedirTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_os.py", line 653, in test_exist_ok_existing_directory
    os.makedirs(path, mode=mode, exist_ok=True)
  File "/var/tmp/portage/dev-lang/python-3.3_pre20110227/work/python-3.3_pre20110227/Lib/os.py", line 152, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '@test_32218_tmp/dir1'

----------------------------------------------------------------------

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11355>
_______________________________________


More information about the Python-bugs-list mailing list