This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add os.fchmod
Type: Stage:
Components: Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, georg.brandl, gvanrossum
Priority: normal Keywords:

Created on 2007-11-30 19:17 by gvanrossum, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fchmod-fchown.diff georg.brandl, 2007-11-30 20:34
Messages (5)
msg57997 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-30 19:17
Modern Unix systems have a fchmod() system call, which is like chmod()
but takes a file descriptor instead of a filename.  Python's os module
(via the posix module) should support this if it exists on the target
platform.
msg58002 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-11-30 20:34
Attached is a patch against trunk that adds fchmod() and fchown() calls
where available. I hope I did the configure magic correctly.
msg58004 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-30 20:40
I'm adding lchmod, too.
msg58006 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-30 20:48
Just check these into the trunk, guys! Great!
msg58010 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-30 21:16
I've applied the combined patch in r59242. I've tested Georg's
fchmod/fchown on my Linux system. They functions are working as expected.

However lchmod is not available on my system although it is in the
header files. It should be available on Mac and some other flavors of Unix.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45869
2007-11-30 21:33:59christian.heimessetstatus: open -> closed
resolution: fixed
2007-11-30 21:16:11christian.heimessetmessages: + msg58010
2007-11-30 20:48:47gvanrossumsetmessages: + msg58006
2007-11-30 20:40:05christian.heimessetnosy: + christian.heimes
messages: + msg58004
2007-11-30 20:34:19georg.brandlsetfiles: + fchmod-fchown.diff
nosy: + georg.brandl
messages: + msg58002
2007-11-30 19:17:50gvanrossumsetpriority: normal
2007-11-30 19:17:35gvanrossumcreate