From owner-freebsd-questions Sat Jan 15 14:46:14 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx2.x-treme.gr (mx2.x-treme.gr [212.120.192.15]) by hub.freebsd.org (Postfix) with ESMTP id 5949315091 for ; Sat, 15 Jan 2000 14:46:06 -0800 (PST) (envelope-from keramida@diogenis.ceid.upatras.gr) Received: from hades.hell.gr (pat39.x-treme.gr [212.120.197.231]) by mx2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with ESMTP id AAA10146; Sun, 16 Jan 2000 00:46:01 +0200 Received: (from charon@localhost) by hades.hell.gr (8.9.3/8.9.3) id QAA52970; Sat, 15 Jan 2000 16:38:20 +0200 (EET) (envelope-from keramida@diogenis.ceid.upatras.gr) Date: Sat, 15 Jan 2000 16:38:20 +0200 From: Giorgos Keramidas To: James A Wilde 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> Reply-To: keramida@ceid.upatras.gr 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <008a01bf5f5b$6eb7dfb0$8208a8c0@iqunlimited.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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