Re: file upload and file permissions

From: somaBoy MX (none_at_nonesuch.net)
Date: 11/09/03


Date: Sun, 9 Nov 2003 23:56:16 +0100


"Michael Wilcox" <mjwilcoCANTHAVESPAM@yahoo.com> wrote...

: > When I manually chmod the folder permissions of the target directory
: > to 777 it does work. But I need my script to be able to create
: > directories, and php doesn't allow chmod-ing to 777.
:
: But PHP does allow this. Doesn't chmod("filename", 0777); work?

It doesn't on my server:

[...]
  if (!ftpMkdir($path, $dir)) {
   $result = 'fail';
  } else {
   chmod($path . $dir, 0777);
   $result = 'ok';
  }

When I run this, the gallery is created allright, but its permissions are
set to 755.

Might this have something to do with "umask"?

.soma



Relevant Pages

  • Re: [PHP] PHP console script vs C/C++/C#
    ... My script is taking a longer time to execute than I want. ... I prefer to write in PHP because that is what I know best. ... This is why I am thinking about rewriting my whole script in a C language. ... Perhaps there are different methods I could be using to speed up execution. ...
    (php.general)
  • Re: How to Add a Feeback Form
    ... I saw nothing in that script that indicates where the form is e-mailed to so ... Greg Maxey/Word MVP ... PHP or not. ... have the support available yet. ...
    (microsoft.public.frontpage.programming)
  • How best to show PHP source? (was: One page, multiple submit buttons)
    ... script to add to the top of a PHP script to enable showing its ... Maybe anybody submitting their own PHP code for critique here ... Anything posted to a newsgroup is a "snapshot" of what the ... there ought to be a FAQ for this ...
    (comp.lang.php)
  • Re: [PHP] PHP console script vs C/C++/C#
    ... My script is taking a longer time to execute than I want. ... I prefer to write in PHP because that is what I know best. ... thinking about rewriting my whole script in a C language. ... execution of the code. ...
    (php.general)
  • Email form script
    ... I have a web form that posts to a .php ... who cannot run .php on their server. ... Or does anyone have a .asp script that will ... Thank you for choosing FormToEmail by FormToEmail.com ...
    (microsoft.public.scripting.jscript)