Skip to content

Commit 3b819cf

Browse files
author
Joan He
committed
MAGETWO-36791: Fixed too broad permissions on files
-address CR comments
1 parent 5170797 commit 3b819cf

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public function addImage(
397397
$this->_mediaDirectory->copyFile($file, $destinationFile);
398398

399399
$storageHelper->saveFile($this->_mediaConfig->getTmpMediaShortUrl($fileName));
400-
$this->_mediaDirectory->changePermissions($destinationFile, DriverInterface::WRITEABLE_DIRECTORY_MODE);
400+
$this->_mediaDirectory->changePermissions($destinationFile, DriverInterface::WRITEABLE_FILE_MODE);
401401
}
402402
} catch (\Exception $e) {
403403
throw new LocalizedException(__('We couldn\'t move this file: %1.', $e->getMessage()));

lib/internal/Magento/Framework/Filesystem/Io/Sftp.php

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// @codingStandardsIgnoreFile
88

99
namespace Magento\Framework\Filesystem\Io;
10+
1011
use Magento\Framework\Filesystem\DriverInterface;
1112

1213
/**

pub/errors/processor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public function saveReport($reportData)
458458
}
459459

460460
@file_put_contents($this->_reportFile, serialize($reportData));
461-
@chmod($this->_reportFile, DriverInterface::WRITEABLE_DIRECTORY_MODE);
461+
@chmod($this->_reportFile, DriverInterface::WRITEABLE_FILE_MODE);
462462

463463
if (isset($reportData['skin']) && self::DEFAULT_SKIN != $reportData['skin']) {
464464
$this->_setSkin($reportData['skin']);

0 commit comments

Comments
 (0)