os.chmod docs enhancement request...

Mike C. Fletcher mcfletch at home.com
Thu Apr 19 07:02:17 EDT 2001


Since some people using the docs won't know what "chmod (path, mode)
Change the mode of path to the numeric mode. Availability: Unix, Windows."
means, a description similar to the following might help:


Derived from the Unix file permission scheme, this command allows you to
change the read/write/execute status of a particular file by specifying a
numeric mode.  There are permissions for three user categories which can be
set with the command: Owner (the current owner of the file), Group
(Meaningful only on Unix?), and Other (anyone else).  The easiest way to
determine what permission you would like to specifies to use an octal
integer to express the integer.  With an octal integer, you specify each
user group's permission with a single digit (after the leading 0), that is:

	0741

Specifies that the owner has permission 7, the group has permission 4, and
anyone else has permission 1.  To determine what a permission means, use the
addition of the following numbers:

	read: 4
	write: 2
	execute: 1

That is, full permissions are 4+2+1, while read-only is 4, and read/write is
4+2.  See the Unix man pages for chmod for further detail. Note: unlike the
Unix command, this method only allows for numeric specification of
permission modes.


Explanation of what the group and other users are under Windows would be
helpful as well.  Enjoy yourselves,
Mike
__________________________________
 Mike C. Fletcher
 Designer, VR Plumber
 http://members.home.com/mcfletch





More information about the Python-list mailing list