Talk:Chmod

message: Is it appropriate to just dump man pages here?  :-)  -- Marj Tiefert, Saturday, April 27, 2002
: probably not. -- Tarquin 21:54 27 May 2003 (UTC)
: No context is established or anything. Since the present article actually contains a lot of information, maybe it is not inviting to rewrite the article. -- Sverdrup 19:30, 10 Dec 2003 (UTC)
replies: text: (Note: it has not been touched since april 2002. Thus, we cannot have an article in this state. I'll replace it with a temporary article with less information content.) Sverdrup
WHY JUST UPLOAD A MAN PAGE? DUMB.
Most man pages, different for each implementation, while provide exact syntax do not discuss uses or reasons or ramifications of commands.
DGerman (talk) 22:04, 16 December 2012 (UTC)
thread_title:  comments from 2002 2003 

message: (Old article content)
       chmod - change the access permissions of files
SYNOPSIS
       chmod   [-Rcfv]   [--recursive]   [--changes]   [--silent]
       [--quiet] [--verbose] [--help] [--version] mode file...
DESCRIPTION
       This manual page  documents  the  GNU  version  of  chmod.
       chmod changes the permissions of each given file according
       to mode, which can be either a symbolic representation  of
       changes  to  make, or an octal number representing the bit
       pattern for the new permissions.
       The format of a symbolic mode  is  `[ugoa...][[+-=][rwxXs-
       tugo...]...][,...]'.   Multiple symbolic operations can be
       given, separated by commas.
       A combination of the letters `ugoa' controls which  users'
       access  to  the file will be changed: the user who owns it
       (u), other users in the file's group (g), other users  not
       in  the  file's  group  (o), or all users (a).  If none of
       these are given, the effect is as if `a' were  given,  but
       bits that are set in the umask are not affected.
       The  operator  `+'  causes  the permissions selected to be
       added to the existing permissions of each file; `-' causes
       them  to  be  removed;  and `=' causes them to be the only
       permissions that the file has.
       The letters `rwxXstugo' select the new permissions for the
       affected  users:  read  (r), write (w), execute (or access
       for directories) (x), execute only if the file is a direc-
       tory  or already has execute permission for some user (X),
       set user or group ID on execution (s), save  program  text
       on swap device (t), the permissions that the user who owns
       the file currently has for it (u),  the  permissions  that
       other  users  in the file's group have for it (g), and the
       permissions that other users not in the file's group  have
       for it (o).
       A  numeric  mode  is  from one to four octal digits (0-7),
       derived by adding up the bits with values  4,  2,  and  1.
       Any  omitted  digits are assumed to be leading zeros.  The
       first digit selects the set user ID (4) and set  group  ID
       (2)  and save text image (1) attributes.  The second digit
       selects permissions for the user who owns the  file:  read
       (4), write (2), and execute (1); the third selects permis-
       sions for other users in the file's group, with  the  same
       values;  and  the fourth for other users not in the file's
       group, with the same values.
       chmod never changes the permissions of symbolic links; the
       are never used.  However, for each symbolic link listed on
       the command line, chmod changes  the  permissions  of  the
       pointed-to  file.   In  contrast,  chmod  ignores symbolic
       links encountered during recursive directory traversals.
       -v, --verbose
              Verbosely describe changed permissions.
       -R, --recursive
              Recursively change permissions of  directories  and
              their contents.
       --help Print  a  usage message on standard output and exit
              successfully.
       --version
              Print version information on standard  output  then
              exit successfully.
:Where would I got to suggest something like this as an addition to the man page included with most distros?  The page is written in a less-readable style (paragraphs 3 and 6 in the description section don't make this obvious)?  A line like this at the beginning would quickly tell someone what order the parameters are in (it's entirely arbitrary).  Making it concise helps with this.
:'*AAABBBCCC  AAA=Owner, BBB=Group, CCC=Everyone else'  Also could have writen [d][owner][group][everyone] but less clear?  — Preceding unsigned comment added by 2A0B:7080:10:0:0:0:1:E187 (talk) 02:35, 16 May 2018 (UTC)
replies: text:  If you are looking for the Linux man-pages project, see the links here. -LiberatorG (talk) 11:24, 16 May 2018 (UTC)
thread_title:  Man page dump 

message: -don't want it on the talk page. Rich Farmbrough 14:09, 29 Jan 2005 (UTC)
thread_title:  Removed the wrong-title tamplate from the dump

message: I added some content, and simplified the sections. Hopefully this rewrite is more readable and understandable. Gbeeker 15:32, 9 September 2005 (UTC)
thread_title:  Rewrite and Section Update 

message: I created a subsection of string mode examples, and then realized there is already an example section.
Both can probably be combined. When I have a chance, I'll do that, unless someone else beats me to it. --Unixguy 19:39, 8 December 2006 (UTC)
thread_title:  String mode examples 

message: Anyone wanna clean up that table with the usage? The X entry is particularly long and hard to read. — SheeEttin {T/C} 23:08, 6 March 2007 (UTC)
thread_title:  Tables 

message: Really?
Wouldn't it be better replaced with a screen shot of usage? Is an image even necessary at all?
There are already external links to various man pages and that screenshot is too small to use comfortably anyway. Not to mention the fact anyone likely to need the chmod man page probably has access to it via their terminal.
87.194.164.154 (talk) 11:17, 14 July 2008 (UTC)
thread_title: Screenshot of man dump

message: That examples should semantically be represented by an HTML table. --85.179.194.128 (talk)  —Preceding undated comment was added at 22:52, 31 August 2008 (UTC)
replies: text: you can do that kind of stuff yourself, too, but I'm not sure if it's any better now Yngvarr (t) (c) 23:04, 31 August 2008 (UTC)
thread_title:  Examples section markup 

message: Just adding information about the Unix function of the same name.--Rfsmit (talk) 23:02, 17 March 2009 (UTC)
replies: text: Done. If you feel like reverting it, consider moving the information I added to a new article.--Rfsmit (talk) 23:28, 17 March 2009 (UTC)
thread_title:  The ''other'' chmod 

message: Can we be a little more specific about what happens? Tisane (talk) 20:19, 9 April 2010 (UTC)
replies: text: This article isn't useful for instruction anyway, so there's no need. 71.131.178.118 (talk) 14:44, 11 July 2011 (UTC)
thread_title:  "Particular care should be taken when a directory is the target because the effect is not intuitive." 

message: typical more documentation written by linux geeks (i mean that in a good way) that don't know how to write documentation for the rest of us (i mean that in a bad way).   —Preceding unsigned comment added by 94.30.109.74 (talk) 12:05, 5 March 2010 (UTC)
thread_title:  comment 

message: I recently encountered the +X option and wondered when it was added, so I started searching around.
Here are some web pages which seem to be reliable copies of old documents.
Solaris 2.x Advanced User Guide (page images, does not mention +X)
http://www.scribd.com/doc/4001642/56/Changing-Permissions-chmod#page=67
Unix first edition man page (11/3/71, only octal modes provided)
http://man.cat-v.org/unix-1st/1/chmod
6th edition (still only octal)
http://man.cat-v.org/unix-6th/1/chmod
8th edition (symbolic modes but no +X)
http://man.cat-v.org/unix_8th/1/chmod  — Preceding unsigned comment added by 207.255.14.95 (talk) 18:45, 23 July 2012 (UTC)
thread_title:  References for when did +X appear 

message: I don't have time to edit the article just now.  But here are some suggestions.
:"Experienced Unix and Linux users tend to recommend that the user of this command check the man page (man chmod) on the system of interest."
Change to something like
:Users of old versions of Unix should check the man page. (with footnote references to old man pages).
Or just delete the sentence.
Add information about using Linux chmod on NTFS volumes such as Windows shared via Samba, USB keys, USB external hard disks formatted as NTFS.  It seems it may not work: http://ubuntuforums.org/showthread.php?t=1658076
Mac OS X (and BSD?) support changing access control lists via chmod.  https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/chmod.1.html
"Octets" is just the wrong word.  An octet is eight bits, not an octal digit (3 bits).
The footnote on "respectively" gives the definition of the word, not support for the statement.  Someone please change it...
:"Particular care should be taken when a directory is the target because the effect is not intuitive.[according to whom?]"
Change to something like
:"Note that the read and execute permissions on a directory have a different meaning:  read access to a directory provides access to the 'names' of the files and subdirectories, while execute access provides access to the 'contents' (and attributes such as file size) provided that the name is already known.
Add examples:
% mkdir d
% ls -ld d
drwxrwxr-x. 2 user group 4096 Jul 23 15:45 d
% echo a>d/a
% cat d/a
a
% head d/*
a
% echo b>d/b
% head d/*
==> d/a <==
a
==> d/b <==
b
% head d/a d/b
==> d/a <==
a
==> d/b <==
b
% chmod a-r d
% head d/*
head: cannot open `d/*' for reading: No such file or directory
% head d/a d/b
==> d/a <==
a
==> d/b <==
b
% chmod a+r,a-x d
% echo d/*
d/a d/b
% head d/*
head: cannot open `d/a' for reading: Permission denied
head: cannot open `d/b' for reading: Permission denied
% head d/a d/b
head: cannot open `d/a' for reading: Permission denied
head: cannot open `d/b' for reading: Permission denied
% 
And some more examples similar to the above to cover other
permutations.
such as the output from these (after a little more work):
export PS1='% '
mkdir d
ls -ld d
echo a>d/a
cat d/a
head d/*
echo b>d/b
head d/*
head d/a d/b
chmod a-r d
head d/*
head d/a d/b
chmod a+r,a-x d
echo d/*
head d/*
head d/a d/b
ls -ld d
chmod a=w d
ls -ld d
ls -al d
echo c>d/c
chmod a+r d
ls -al d
ls -ld d
chmod a=wx d
ls -ld d
ls -al d
echo c>d/c
head d/a d/b d/c
head d/*
echo d/*
chmod a=r d
echo d/*
ls -ld d
ls -al d
chmod a=x d
ls -ld d
ls -al d
echo d/*
head d/a d/b d/c
head d/a d/b d/c d/d
rm d/a
rm -f d/a
chmod a=w d
ls -ld d
ls -al d
rm -f d/a
chmod a=wx d
ls -ld d
ls -al d
rm -f d/a
head d/a d/b d/c d/d
++++ Please avoid using meaningless names. 
DGerman (talk) 22:10, 16 December 2012 (UTC)
replies: text: "In addition, it will not work on all file types. For example, it has no effect on a symbolic link."
This is not correct.  It has an effect, changing the mode of the pointed to file or directory if the link was mentioned on the command line, but doing nothing for links encountered in recursive traversal.
The cited reference on "The chmod command options are specified like this:[2]"
http://ss64.com/bash/chmod.html
is not the most appropriate, although it seems to be a better man page than some.
ss64.com (http://ss64.com/docs/ "About SS64.com, Simon Sheppard’s website") seems to be accurate but not authoritative.
I suspect the best choice would be the FSF page.— Preceding unsigned comment added by 207.255.14.95 (talk) 20:01, 23 July 2012 (UTC)
thread_title:  Suggestions for improvements 

message: There is much documentation available which defines the syntax of a command without conveying an understanding of the usage.
I have tried to use meaningful words in filenames like "blest" (past participle of bless) to imply why one would want to remove write access.
As well as findPhoneNumbers.sh which is supposed to be a script which warrants the use of the execute mode where the name phoneNumbers has not reasonable use for an execute attribute.  — Preceding unsigned comment added by DGerman (talk • contribs) 16:18, 19 October 2013 (UTC)
thread_title:  names consistent with usage 

message: Coming across this article I noticed the poor Wheel of Fortune example. It has 8x more negative than positive ratings on YouTube. It is not even clear, that the contestants chose the letters on intent. It even looks like it was a coincident, because they were given an additional joker letter for their last turn - I'm not familiar with the rules of the game. 
I'm not certain if I could edit it myself, but it should certainly be put to discussion. This little part of the article is not what I'm used from the high standards of Wikipedia.  — Preceding unsigned comment added by 92.201.131.190 (talk) 00:32, 28 November 2013 (UTC)
thread_title:  Poor example 

message: This lists numbers in binary, but chmod does not take numbers in binary format! It takes them in decimal.
This needs a new column with the numbers in decimal please.
I came to this page trying to find out how to decide the a decimal number if I know I want permissions X Y and Z.
I left the page no wiser than when I arrived :(
The man page also does not help.  — Preceding unsigned comment added by 213.216.142.12 (talk) 15:21, 4 March 2014 (UTC)
thread_title:  "Numerical permissions" is difficult to understand (not useless) 

message: The modes r,w, and x have vastly different effects dependent on if it's a filehttp://www.hackinglinuxexposed.com/articles/20030417.html or a folderhttp://www.hackinglinuxexposed.com/articles/20030424.html, which I don't think is clear enough in the current tables.
First of all, the description above the table talks about "three basic modes" but the table shows those three (r, w, x), plus three special modes (+X, s, t). I think "special execute", "setuid/gid" and "sticky" should move into the "Special Modes" section, but still refer to them close to the "three basic modes" table - or is there a good reason for having them here?
As a second step, I think there should be two "three basic modes" tables, one for files and one for folders, to make it easier to list the differences in behaviour, and especially noting the effect on whether you can create/delete/rename/list/execute/etc a file or folder, which currently isn't clearly shown.
This is an RFC, if anyone has some suggestions/amendments to the above, please let me know - I could make the actual changes next week-ish.Mwoc87 (talk) 17:02, 4 December 2014 (UTC)
thread_title:  Splitting up 'modes' table 

message: Is it useful  to include the system call in this (or actually any unix command) page?
DGerman (talk) 17:13, 30 August 2015 (UTC)
thread_title:  Is System call useful 

message: Is the green on black screen shot, which in nearly impossible to read, really helpful?
If there are no objections I will remove it after August 2019.
DGerman (talk) 21:42, 22 July 2019 (UTC)
thread_title:  screenshot helpful or confusing 

message: This article has taken a literary feeling.
I have removed the references to decimal and some of the binary ones (other than in the table)  as unnecessary confusing.
I will (unless someone else does )  rework the section on combining flags to determine rights and the references to odd, subtracting nothing if..., only if it is greater than or equal to ...
Also as someone has mentioned previously, the entire discussion about what modes are and what they permit is out of scope and is referenced the beginning of the article
DGerman (talk) 01:20, 12 April 2021 (UTC)
thread_title:  much rework needed 

message: See:
* Talk:Modes (Unix)#Should this redirect to chmod and
* Talk:Unix file types#Proposed merge of Modes (Unix) into Unix file types.
– wbm1058 (talk) 14:31, 26 December 2020 (UTC)
thread_title:  Recent merge discussions 

message: The early paragraph discussing the stat structure might belong with the file permissions  but not in the chmod command. Unless anyone disagrees I'll delete it next time I'm here. DGerman (talk) 01:07, 27 August 2021 (UTC)
thread_title:  stat structure not helpful, propose deletion