From owner-freebsd-questions@FreeBSD.ORG Tue Oct 11 15:19:12 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E892B16A44A for ; Tue, 11 Oct 2005 15:19:12 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 989EC43D45 for ; Tue, 11 Oct 2005 15:19:12 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 24027 invoked from network); 11 Oct 2005 15:19:12 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Oct 2005 15:19:11 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id D835B41; Tue, 11 Oct 2005 11:19:10 -0400 (EDT) Sender: lowell@be-well.ilk.org To: David Marshall References: <53f158630510101240n50677077l5f0cb9abd66002a1@mail.gmail.com> From: Lowell Gilbert Date: 11 Oct 2005 11:19:10 -0400 In-Reply-To: <53f158630510101240n50677077l5f0cb9abd66002a1@mail.gmail.com> Message-ID: <44br1wxes1.fsf@be-well.ilk.org> Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: mkstemp on NFS Mount? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2005 15:19:13 -0000 David Marshall writes: > I've read mixed opinions on whether it's feasible to be doing msktemp > on an NFS-mounted filesystem. Is it possible to do this? > > I use File::Temp to use mkstemp, but it's all the same, I get error > messages such as: > > Error in tempfile() using /mnt/.XXXXX: Could not create temp file > /mnt/.hkATa: Operation not supported at (eval > 14)[/usr/local/lib/perl5/5.8.7/perl5db.pl:628] line 2 > > Is this a matter of not having certain permissions set properly? Probably not; no way to say without seeing your code. In C, I get no errors at all on a quick test program (at bottom of message). I tried it on both NFS and non-NFS filesystems. I don't know what problems you were referring to. ================================================================ #include #include #include int main(void) { char pattern[100] = "foo.bar.XXXX"; char text[] = "hello world\n"; int i,j; i = mkstemp(pattern); printf("pattern now %s\n",pattern); j = write(i,text,sizeof(text)); if (sizeof(text) != j) printf("write() wrote wrong length %d\n"); j = close(i); if (j != 0) printf("close() returned error; errno is %d\n",errno); }