Article View: news.software.nntp
Article #55031Re: Almost there......what's the cause of this?
From: Russ Allbery
Date: Thu, 08 Nov 2001 02:06
Date: Thu, 08 Nov 2001 02:06
51 lines
2818 bytes
2818 bytes
Steven L Sesar <ssesar@rcn.com> writes:
> I understand what these errors mean in terms of permissions, but I can't
> figure out the cause. If it matters, inndstartt and startinnfeed are
> both root:news and SUID.
The best way to handle CNFS buffers on block devices is to create new
devices for the disk slices that you intend to use. I use the following
script to do that:
#!/usr/bin/perl -w
$ID = q$Id: mkdiskdev,v 0.1 1999/03/04 06:24:55 eagle Exp $;
#
# mkdiskdev -- Construct a disk block device.
#
# Written by Russ Allbery <rra@stanford.edu>
# Copyright 1998 Board of Trustees, Leland Stanford Jr. University
#
# Use this to generate block devices for use as cycbuffs under CNFS. It
# uses ls -lL to find the correct major and minor numbers for a given
# device, uses mknod to create a new copy of it in the given directory, and
# then chowns it to news.news.
#
# Usage: mkdiskdev <device> <directory>
use vars qw($ID);
unless (@ARGV == 2) { die "Usage: $0 mkdiskdev <device> <directory>\n" }
my ($device, $directory) = @ARGV;
unless (-e "/dev/dsk/$device") { die "$0: device $device not found\n" }
my $ls = `ls -lL /dev/dsk/$device`;
my ($major, $minor);
if ($ls =~ /(\d+),\s+(\d+)/) {
$major = $1;
$minor = $2;
} else {
die "$0: can't find major and minor numbers for $device\n";
}
system ('mknod', "$directory/$device", 'b', $major, $minor) == 0
or die "$0: mknod exited with status ", ($? >> 8), "\n";
my $uid = getpwnam 'news';
my $gid = getgrnam 'news';
chown ($uid, $gid, "$directory/$device")
or die "$0: can't chown device: $!\n";
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<ylg07q9fud.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mailReferences:
<3BE988EA.9BCDECDC@rcn.com>Show Full Headers
Complete Article Headers
Message-ID: <ylg07q9fud.fsf@windlord.stanford.edu> Subject: Re: Almost there......what's the cause of this? Date: Thu, 08 Nov 2001 02:06:02 +0000 From: Russ Allbery <rra@stanford.edu> References: <3BE988EA.9BCDECDC@rcn.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!logbridge.uoregon.edu!newsfeed.stanford.edu!nntp.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 50 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.Stanford.EDU 1005185162 9013 171.64.13.23 (8 Nov 2001 02:06:02 GMT) X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)