[ python-Feature Requests-1200804 ] enhancing os.chown functionality

SourceForge.net noreply at sourceforge.net
Wed Jun 1 22:37:43 CEST 2005


Feature Requests item #1200804, was opened at 2005-05-12 18:26
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1200804&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: None
Status: Closed
Resolution: Rejected
Priority: 5
Submitted By: gyrof (gyrof)
Assigned to: Nobody/Anonymous (nobody)
Summary: enhancing os.chown functionality

Initial Comment:
Hi,
I don't think it is currently possible (with os.chown
or any other Python library function) to change the
groupId of a file without specifying the userId (like
posix 'chgrp' does), or to change the userId without
specifying the groupId.
I would suggest adding the option of having os.chown
accept None as either the userId or groupId, and having
the function change only the 'non-None' portion of the
file ownership.

Thanks for your consideration.

-g

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

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-06-01 22:37

Message:
Logged In: YES 
user_id=1188172

I've create patch #1213031 which includes a note in the docs
about this.

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

Comment By: Martin v. Löwis (loewis)
Date: 2005-05-20 23:41

Message:
Logged In: YES 
user_id=21627

Jeff already provided the right analysis: It *is* currently
possibly with os.chown to only change the groupid without
specifying the userid: just pass -1 as the userid. The
requested feature is already there, so I'm rejecting this
request.

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

Comment By: Jeff Epler (jepler)
Date: 2005-05-19 00:49

Message:
Logged In: YES 
user_id=2772

the posix (os) module is intended as a thin wrapper around
operating system services.  The chown(2) syscall requires
that owner and group both be specified.

Possibly an enhanced chownonly/chgrp would find a home in
the 'shutil' module.

Possibly translating a parameter of None into -1 (which
means 'no change') would be accepted as a patch.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1200804&group_id=5470


More information about the Python-bugs-list mailing list