cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gianugo Rabellino" <gian...@apache.org>
Subject Re: Flowscript file permissions on mkdir - pls help!
Date Thu, 01 Jun 2006 13:34:21 GMT
On 6/1/06, Dan Hertz <dan@danhertz.com> 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


Mime
View raw message