Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 20923 invoked from network); 1 Jun 2006 13:36:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2006 13:36:34 -0000 Received: (qmail 72614 invoked by uid 500); 1 Jun 2006 13:36:29 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 72565 invoked by uid 500); 1 Jun 2006 13:36:29 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 72553 invoked by uid 99); 1 Jun 2006 13:36:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 06:36:29 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gianugo@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 06:36:28 -0700 Received: by nf-out-0910.google.com with SMTP id a4so535730nfc for ; Thu, 01 Jun 2006 06:36:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=DS+Y9Q+9tFj0R2Hs3pvjk7mzRt4zkrGOITwj2wMy4c9R1/q2GvDbBBSi8E6mb5JVd6+esbJSVQTEv3CGRBwGJKGFNuLlSTABaqVjk8pHzHdRwCuwwO1E5py5Br0t2cyU/TZkABLCy7WfIgnd+Rr1fcE0QF3aaKcMYrHWQfzyAg0= Received: by 10.48.215.5 with SMTP id n5mr778861nfg; Thu, 01 Jun 2006 06:34:21 -0700 (PDT) Received: by 10.67.24.7 with HTTP; Thu, 1 Jun 2006 06:34:21 -0700 (PDT) Message-ID: <7557e99f0606010634y44d234b3v7ebd4448c690ad47@mail.gmail.com> Date: Thu, 1 Jun 2006 15:34:21 +0200 From: "Gianugo Rabellino" Sender: gianugo@gmail.com To: users@cocoon.apache.org, dan@danhertz.com Subject: Re: Flowscript file permissions on mkdir - pls help! In-Reply-To: <447F067E.1000506@danhertz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <447F067E.1000506@danhertz.com> X-Google-Sender-Auth: 2dd1b7201606958d X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 6/1/06, Dan Hertz wrote: > Hi, > > The following flowscript dynamically makes a directory and uploads a > photo to it: > > ===Extracts=== > > var uploadWidget = form.lookupWidget("upload"); > if (uploadWidget.getValue() != null) { > > // test if user directory exists, if not, create it > if (!userDir.exists()) { > userDir.mkdirs(); > } > uploadWidget.getValue().copyToFile(userDir + "/" + fileName); > } > > =========== > > On Windows this works great; but on LINUX, the folder gets created with > 0755 permissions (set by my ISP). This is insufficient to run my PHP > script on the photo -- which needs the folder to be set to 0774. > > How do I set the folder permission values from this flowscript? "umask" is your friend. You should set it in your account profile and it will create files/dir with proper permissions. In your case, you need to set it to something like 002 (IIRC, but YMMV). Of course, if you don't have shell access (or ftp access) to your home dir, you're out of luck... Ciao, -- Gianugo Rabellino Sourcesense, making sense of Open Source: http://www.sourcesense.com Orixo, the XML business alliance: http://www.orixo.com (blogging at http://www.rabellino.it/blog/) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org