chmod bug

For some reason the following chmod command fails.

$ touch a.a
$ chmod -w a.a
chmod: Must indicate a mode and at least one file

This works on all other Unixen I tested. The following has the same effect
and does work.
$ chmod a-w a.a

The configure script of rcs expects the former semantics though, and dies
when it doesn’t work.

Thanks,
Shaun

Shaun Jackman <sjackman@nospam.vortek.com> wrote:

For some reason the following chmod command fails.

Parsing bug in chmod. Internal PR/9427. According to that it was
fixed some time ago and should be available in 6.1.1 and beyond …

This works on all other Unixen I tested. The following has the same effect
and does work.
$ chmod a-w a.a

That is the suggested work-around until you upgrade.

John Garvey <jgarvey@qnx.com> wrote:

Shaun Jackman <> sjackman@nospam.vortek.com> > wrote:
For some reason the following chmod command fails.

Parsing bug in chmod. Internal PR/9427. According to that it was
fixed some time ago and should be available in 6.1.1 and beyond …

my tests showed it didn’t work for any versions of 6.1.x
but it does work in 6.2NC.

frank

It’s not so much of a bug as a missing feature. POSIX says that chmod shall
conform to the utility syntax guidelines, which amongst other things
stipulate that you can supply an argument of “–” to stipulate
end-of-options, after which any following arguments will be treated as
operands even if they start with a “-”. So you can work around this and on
any version of Neutrino, and any other POSIX system, by using “chmod – -w
filename”

“Frank Liu” <liug@mama.indstate.edu> wrote in message
news:aismuh$pp5$1@inn.qnx.com

John Garvey <> jgarvey@qnx.com> > wrote:
Shaun Jackman <> sjackman@nospam.vortek.com> > wrote:
For some reason the following chmod command fails.

Parsing bug in chmod. Internal PR/9427. According to that it was
fixed some time ago and should be available in 6.1.1 and beyond …

my tests showed it didn’t work for any versions of 6.1.x
but it does work in 6.2NC.

frank

Frank Liu <liug@mama.indstate.edu> wrote:

John Garvey <> jgarvey@qnx.com> > wrote:
Shaun Jackman <> sjackman@nospam.vortek.com> > wrote:
For some reason the following chmod command fails.
Parsing bug in chmod. Internal PR/9427. According to that it was
fixed some time ago and should be available in 6.1.1 and beyond …
my tests showed it didn’t work for any versions of 6.1.x
but it does work in 6.2NC.

OK, thanks; I don’t have access to either version so was going off
the comments in the bug database (which would appear to be a bit
overly-optimistic); I’ll add your finding to the PR in case this
issue is raised again …