Summary: | chown(8) manual misdescribes handling of symlinks | ||
---|---|---|---|
Product: | Documentation | Reporter: | Gary W. Swearingen <swear> |
Component: | Books & Articles | Assignee: | Tom Rhodes <trhodes> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Gary W. Swearingen
2002-03-29 01:30:01 UTC
True. But one who has read the descriptionn of -H, -L and -R above already knows that chown(1) handles symlinks specially. No need to repeat what has already been written above, IMHO. - Giorgos Giorgos Keramidas <keramida@freebsd.org> writes: > True. But one who has read the descriptionn of -H, -L and -R above already > knows that chown(1) handles symlinks specially. No need to repeat what has > already been written above, IMHO. First, those only apply when using -R. Second, it's not enough to know that there is special handling; something needs to describe the handling and it shouldn't, like the -h description, describe it wrongly. I don't see that I've repeated anything, except the mention of -h in the program description because the current description is not true without -h. Does not the -h description imply that "the file that the link points to" will be changed in the absense of -h? In fact, that file will not be changed (unless that dangerous trailing slash feature/bug is used). Gary, how does the following patch look? I omitted the sentence under the description where you asked symlink(7) be mentioned. symlink(7) is in the see also section, I changed the description to one that I feel is satisfactory, I also think that -h is good now. If anything, perhaps we should cut everything, including ``rather'' after the -h option. But its your PR. -- Tom (darklogik) Rhodes --- chown.8.old Mon Apr 1 21:41:30 2002 +++ chown.8 Mon Apr 1 21:52:17 2002 @@ -57,7 +57,10 @@ .Ar .Sh DESCRIPTION .Nm Chown -sets the user ID and/or the group ID of the specified files. +changes the user ID and/or the group ID of the specified files. +Symbolic links named by arguments are silently left unchanged unless +.Op Fl h +is used. .Pp The options are as follows: .Bl -tag -width Ds @@ -82,8 +85,9 @@ Don't report any failure to change file owner or group, nor modify the exit status to reflect such failures. .It Fl h -If the file is a symbolic link, change the user ID and/or the group ID -of the link itself rather than the file that the link points to. +If the file is a symbolic link, change the user ID and/or the +group ID of the link itself rather than silently leaving the link +unchanged. .It Fl v Cause .Nm Gary, I have looked over the various comments on -doc, and produced this new patch. How does it look? -- Tom (darklogik) Rhodes --- chown.8.old Wed Apr 3 11:21:57 2002 +++ chown.8 Wed Apr 3 11:22:27 2002 @@ -57,7 +57,10 @@ .Ar .Sh DESCRIPTION .Nm Chown -sets the user ID and/or the group ID of the specified files. +changes the user ID and/or the group ID of the specified files. +Symbolic links named by arguments are silently left unchanged unless +.Op Fl h +is used. .Pp The options are as follows: .Bl -tag -width Ds @@ -82,8 +85,8 @@ Don't report any failure to change file owner or group, nor modify the exit status to reflect such failures. .It Fl h -If the file is a symbolic link, change the user ID and/or the group ID -of the link itself rather than the file that the link points to. +If the file is a symbolic link, change the user ID and/or the +group ID of the link itself. .It Fl v Cause .Nm Responsible Changed From-To: freebsd-doc->trhodes I will close this one also as the current patch is mine State Changed From-To: open->patched Patch applied to CURRENT, I'll commit to STABLE in 3 days, thanks Gary State Changed From-To: patched->closed Just committed the change to STABLE, thanks Gary! Please reopen this PR; the fix added "[-f]" instead of "-f". Also, the previously-committed change for the PR said that symlinks were not changed, by default, but (importantly) didn't say that symlinks are not followed by default, either. The patch below fixes both problems (and also the problem of capitalizing the command name). --- /pr/work/chown..orig.8 Wed Feb 12 17:28:53 2003 +++ /pr/work/chown.8 Wed Feb 12 17:37:50 2003 @@ -56,11 +56,10 @@ .No : Ns Ar group .Ar .Sh DESCRIPTION -.Nm Chown -changes the user ID and/or the group ID of the specified files. -Symbolic links named by arguments are silently left unchanged unless -.Op Fl h -is used. +The +.Nm +utility changes the user ID and/or the group ID of the specified files. +By default, symbolic links are ignored. .Pp The options are as follows: .Bl -tag -width Ds State Changed From-To: closed->analyzed Switch to analyzed at Gary's request. State Changed From-To: analyzed->patched This was fixed in current, I'll close after I see if this has been fixed in the other branches. State Changed From-To: patched->closed RELENG_4 and RELENG_5 have the same information as CURRENT. |