diff --git a/System/File/ContainerInterface.php b/System/File/ContainerInterface.php index 997e1862a..cee51cc86 100644 --- a/System/File/ContainerInterface.php +++ b/System/File/ContainerInterface.php @@ -66,7 +66,7 @@ interface ContainerInterface * * @param string $path Path of the resource * - * @return int Permissions (e.g. 0644); + * @return int Permissions (e.g. 0755); * * @since 1.0.0 */ @@ -315,7 +315,7 @@ interface ContainerInterface /** * Get the permissions id of the resource. * - * @return int Permissions (e.g. 0644); + * @return int Permissions (e.g. 0755); * * @since 1.0.0 */ diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index 4ce22b8e0..df331c93f 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -133,7 +133,7 @@ class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public static function create(string $path, string $permission = '0644', bool $recursive = false) : bool + public static function create(string $path, string $permission = '0755', bool $recursive = false) : bool { } diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index 61e0679ca..c0e2d6430 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -57,7 +57,7 @@ class File extends FileAbstract implements FileInterface || (!$exists && ($mode & ContentPutMode::CREATE) === ContentPutMode::CREATE) ) { if (!Directory::exists(dirname($path))) { - Directory::create(dirname($path), 0644, true); + Directory::create(dirname($path), 0755, true); } $stream = fopen('data://temp,' . $content, 'r'); @@ -271,7 +271,7 @@ class File extends FileAbstract implements FileInterface if ($overwrite || !self::exists($to)) { if (!Directory::exists(dirname($to))) { - Directory::create(dirname($to), 0644, true); + Directory::create(dirname($to), 0755, true); } return ftp_rename($con, $from, $to); diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 7dc2cddeb..e506536e6 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -309,7 +309,7 @@ class Directory extends FileAbstract implements DirectoryInterface } if (!file_exists($to)) { - self::create($to, 0644, true); + self::create($to, 0755, true); } elseif ($overwrite && file_exists($to)) { self::delete($to); } else { @@ -346,7 +346,7 @@ class Directory extends FileAbstract implements DirectoryInterface } if (!self::exists(self::parent($to))) { - self::create(self::parent($to), 0644, true); + self::create(self::parent($to), 0755, true); } rename($from, $to); @@ -391,7 +391,7 @@ class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public static function create(string $path, int $permission = 0644, bool $recursive = false) : bool + public static function create(string $path, int $permission = 0755, bool $recursive = false) : bool { if (!file_exists($path)) { if (!$recursive && !file_exists(self::parent($path))) { diff --git a/System/File/Local/File.php b/System/File/Local/File.php index 123320a5b..617394685 100644 --- a/System/File/Local/File.php +++ b/System/File/Local/File.php @@ -80,7 +80,7 @@ class File extends FileAbstract implements FileInterface file_put_contents($path, $content . file_get_contents($path)); } else { if (!Directory::exists(dirname($path))) { - Directory::create(dirname($path), 0644, true); + Directory::create(dirname($path), 0755, true); } file_put_contents($path, $content); @@ -265,7 +265,7 @@ class File extends FileAbstract implements FileInterface if ($overwrite || !file_exists($to)) { if (!Directory::exists(dirname($to))) { - Directory::create(dirname($to), 0644, true); + Directory::create(dirname($to), 0755, true); } if ($overwrite && file_exists($to)) { @@ -291,7 +291,7 @@ class File extends FileAbstract implements FileInterface if ($overwrite || !file_exists($to)) { if (!Directory::exists(dirname($to))) { - Directory::create(dirname($to), 0644, true); + Directory::create(dirname($to), 0755, true); } if ($overwrite && file_exists($to)) { @@ -359,7 +359,7 @@ class File extends FileAbstract implements FileInterface { if (!file_exists($path)) { if (!Directory::exists(dirname($path))) { - Directory::create(dirname($path), 0644, true); + Directory::create(dirname($path), 0755, true); } if (!is_writable(dirname($path))) { diff --git a/System/File/Local/FileAbstract.php b/System/File/Local/FileAbstract.php index ed70f1701..fa7253609 100644 --- a/System/File/Local/FileAbstract.php +++ b/System/File/Local/FileAbstract.php @@ -91,7 +91,7 @@ abstract class FileAbstract implements ContainerInterface * @var int * @since 1.0.0 */ - protected $permission = 0644; + protected $permission = 0755; /** * Constructor. diff --git a/System/File/Local/LocalStorage.php b/System/File/Local/LocalStorage.php index 8e1859a79..af70e5dc7 100644 --- a/System/File/Local/LocalStorage.php +++ b/System/File/Local/LocalStorage.php @@ -95,7 +95,7 @@ class LocalStorage extends StorageAbstract */ public static function create(string $path) : bool { - return stripos($path, '.') === false ? Directory::create($path, 0644, true) : File::create($path); + return stripos($path, '.') === false ? Directory::create($path, 0755, true) : File::create($path); } /**