Thanks for helping me out, Gianugo. I'm not sure I follow though -- is umask not meant to *subtract* values, in other words, 0777 - 002 = 0775. But if my system default (set by the ISP) is 0755, how do I use umask to *bump it up* to 0775?

Daniel

PS I'm a Windows guy, so please bear with me...

===============

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to