Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2001 09:06:36 -0400
From:      Bill Vermillion <bill@wjv.com>
To:        Giorgos Keramidas <charon@labs.gr>
Cc:        H <hans@lambermont.dyndns.org>, freebsd-fs@FreeBSD.ORG
Subject:   Re: symlink modes (once again probably)
Message-ID:  <20010915090636.A13259@wjv.com>
In-Reply-To: <20010915142038.A54127@hades.hell.gr>; from charon@labs.gr on Sat, Sep 15, 2001 at 02:20:38PM %2B0300
References:  <20010915123753.A90565@moya.lambermont.dyndns.org> <20010915142038.A54127@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 15, 2001 at 02:20:38PM +0300, Giorgos Keramidas thus sprach:
> hans@lambermont.dyndns.org wrote:

> > The modes cannot be changed by chmod, but according to CHMOD(1)
> > 'Symbolic links do not have modes' which appears not to be true.
> > So perhaps this man page should be updated, or something else is
> > broken.

> Where does the manpage say that?

In describes it like in my man pages directly after all the options.
The date on the bottom of the page says March 31, 1994.

Physical dates on l */chmod in /usr/share man look like this

-rw-r--r--  1 man   wheel  2817 Sep  4 10:33 /usr/share/man/cat1/chmod.1.gz
-rw-r--r--  3 man   wheel  2426 Mar 20  2000 /usr/share/man/cat2/chmod.2.gz
-r--r--r--  1 root  wheel  3584 Sep  1 10:35 /usr/share/man/man1/chmod.1.gz
-r--r--r--  3 root  wheel  3160 Sep  1 10:34 /usr/share/man/man2/chmod.2.gz

Note that the dates relate to the time of the last makeworld and 
install world and is is release 4.4-RC.

However if you enter chmod on a command line with no argument
like this:

Usage: chmod [-fhlHLPR] mode file ...

Here is an -h flag there.  There is no indication of a -v flag
which is in the documentation.

> My manpage for chmod says:
> 
>      -h      If the file is a symbolic link, change the mode of the link
>              itself rather than the file that the link points to.

And it is not in mine.  My /usr/src/bin/chmod/chmod.1 also does not
have an -h flag.   The source - chmod.c - in that diretory say
this.
-------------
		case 'h':
			/*
			 * In System V (and probably POSIX.2) the -h option
			 * causes chmod to change the mode of the symbolic
			 * link.  4.4BSD's symbolic links don't have modes,
			 * so it's an undocumented noop.  Do syntax checking,
			 * though.
			 */
			hflag = 1;
			break;
		/*
--------------

> It would help if you mentioned which version of FreeBSD you're
> running, and when the chmod manpage you have was last updated. A
> quote from the manpage would be nice too.

While I am not the author of the original comment I did the above,
quoted the man pages, showed the source of the man pages, and
the above source code has a date of August 16 09:36.  I perform
cvsup regularly.

Now let me ask the same question you ask of the original poster.
Dates of your man, man sources, chmod.c and chmod.1  ?

It would interesting to see where the divergance occurs.

Bill
-- 
Bill Vermillion -   bv @ wjv . com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010915090636.A13259>