Jump to content

[SOLVED] mkdir not changing permissions.


Ninjakreborn

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.