On 6/1/06, Dan Hertz <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]