Jump to content

Recommended Posts

if (!mkdir($docroot . "/geosystems/projectfiles/" . $name, 0777)) {

echo "Not-Created";

}else{

echo "created";

}

quick example of the type of thing I am trying to use.

The directory it's creating is 4 (roughly) levels doop.

root/dev/g/projectfiles/created directory here

I am trying to set the permissions to 777.

But it's refusing to, it's setting them to 0555

755

I looked up and located a bug on php.net

There was a fix looking like

if (!mkdir($docroot . "/geosystems/projectfiles/" . $name, 01777)) {

echo "Not-Created";

}else{

echo "created";

}

I tried that fix and it still did not work.  I needed to create the directory and give it 777 permissions because the files needed to be uploaded via ftp by the client, then I have other scripts automatically getting the file's "from" that directory.  Any advice?

Link to comment
https://forums.phpfreaks.com/topic/50005-solved-mkdir-not-changing-permissions/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.