Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jan 2000 16:38:20 +0200
From:      Giorgos Keramidas <charon@hades.hell.gr>
To:        James A Wilde <james.wilde@telia.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: chmod command doesn't work was: chmod: invalid file mode: 04711
Message-ID:  <20000115163820.A52867@hades.hell.gr>
In-Reply-To: <008a01bf5f5b$6eb7dfb0$8208a8c0@iqunlimited.net>
References:  <7787.947865635@axl.noc.iafrica.com> <00a501bf5eb8$aa0e71d0$8208a8c0@iqunlimited.net> <002801bf5f4a$0ccca4e0$8208a8c0@iqunlimited.net> <20000115040844.J508@fw.wintelcom.net> <008a01bf5f5b$6eb7dfb0$8208a8c0@iqunlimited.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 15, 2000 at 02:21:25PM +0100, James A Wilde wrote:
> Thanks, Alfred.
> 
> The output of 'truss chmod 711 test' is:
> 
> syscall write(2,0xefbfd584,7)
>         returns 7 (0x7)
> syscall write(2,0xefbfd598,22)
>         returns 22 (0x16)
> syscall write(2,0xefbfd588,1)
>         returns 1 (0x1)
> syscall exit(0x1)
>         process exit, rval = 256
> 
> The output of 'ktrace chmod 711 test' is attached as it is a binary file.

Running the output of your ktrace through kdump, I see no call to the
chmod system call.  Testing chmod through ktrace/kdump on my machine I
saw what was expected, the lines:

	% touch test-file
	% ktrace -f ktrace.mine chmod 644 test-file
	% kdump -f ktrace.mine
	...
	52959 chmod    CALL  chmod(0x805a000,0x1a4)
	52959 chmod    NAMI  "test-file"
	52959 chmod    RET   chmod 0
	52959 chmod    CALL  exit(0)

which indicate that there was a call to chmod() syscall.

Is it possible that your /bin/chmod has been tampered with by someone
else, while you were away?  Check the modification dates of your /bin
directory files.

-- 
Giorgos Keramidas, < keramida @ ceid . upatras . gr >
"What we have to learn to do, we learn by doing." [Aristotle]


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




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