From owner-freebsd-current Fri Jan 15 12:23:58 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA05907 for freebsd-current-outgoing; Fri, 15 Jan 1999 12:23:58 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA05900 for ; Fri, 15 Jan 1999 12:23:56 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id PAA07361; Fri, 15 Jan 1999 15:23:56 -0500 (EST) Date: Fri, 15 Jan 1999 15:23:56 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Cory Kempf cc: freebsd-current@FreeBSD.ORG Subject: Re: umount: permission denied as root? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 15 Jan 1999, Cory Kempf wrote: > > I recently purchased an optical drive for doing backups. After doing a > backup, I naturally flipped the switch to write protect. > > At a later point, I needed to restore some files from the backup, and > so, stuck the disk back in, and mounted it. > > When I was done, the disk wouldn't unmount. When I tried, umount > came back with a 'permission denied'. At the time, I was root. (If > root doesn't have permission, who does?!) > > The problem was in my /etc/fstab file, I had the following: > > /dev/da1c /backup ufs rw 0 0 > > OK, so it is my fault, I should have mounted it read-only. > Unfortunately, it took a reboot to get the disk out of the drive! > > So, I am thinking that perhaps the code should be made more robust? > I had this exact problem with my LS-120 a week or so ago. Here's a reenaction (yes, I'm doing this in real life now to verify it's working) {"/home/green"}# mount /floppy {"/home/green"}# umount /floppy umount: /floppy: Input/output error {"/home/green"}# mount | grep flop /dev/wfd0a on /floppy (local, writes: sync 2 async 2) {"/home/green"}# # d'oh! It's write-protected. {"/home/green"}# mount -u -o ro /floppy {"/home/green"}# umount /floppy {"/home/green"}# Hope I helped! > +C > > -- > Thinking of purchasing RAM from the Chip Merchant? > Please read this first: > > Cory Kempf Macintosh / Unix Consulting & Software Development > ckempf@enigami.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message