Commit 19b98948 by Qiang Xue

Use 0666 to set files as writable.

parent 00232f7a
...@@ -238,11 +238,10 @@ EOF ...@@ -238,11 +238,10 @@ EOF
foreach ((array) $options[self::EXTRA_WRITABLE] as $path) { foreach ((array) $options[self::EXTRA_WRITABLE] as $path) {
echo "Setting writable: $path ..."; echo "Setting writable: $path ...";
if (is_dir($path) || is_file($path)) { if (is_dir($path) || is_file($path)) {
chmod($path, 0777); chmod($path, is_file($path) ? 0666 : 0777);
echo "done\n"; echo "done\n";
} else { } else {
echo "The directory or file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path; echo "The directory or file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path;
return; return;
} }
} }
...@@ -254,7 +253,6 @@ EOF ...@@ -254,7 +253,6 @@ EOF
echo "done\n"; echo "done\n";
} else { } else {
echo "\n\tThe directory or file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path . "\n"; echo "\n\tThe directory or file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path . "\n";
return; return;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment