-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting directoryPerm to 0755 not working #81
Comments
the same for me |
I have the same problem. I think this has to do with umask rules but I have no idea how to bypass them. Umask 0022 converts a 0777 to 0755. |
I think it's caused by a parent class ... this below: Once changed that line to 0777 .. it works and set's proper permissions whatever typed in directoryPerm parameter. |
The problem is that /**
* @var int
*/
protected $directoryPerm = 0744;
/**
* @inheritdoc
*/
public function createDir($dirname, Config $config)
{
$connection = $this->getConnection();
if (! $connection->mkdir($dirname, $this->directoryPerm, true)) {
return false;
}
return ['path' => $dirname];
} You can see that THE SOLUTION for this is to use the accessor method called $filesystem = Storage::disk('sftp');
$filesystem->getDriver()->getAdapter()->setDirectoryPerm(0755);
$filesystem->put('dir1/dir2/test.txt', 'Hello World'); |
Here's my config. :
But the directoryPermission is always 0744.
File permission is changed to 0755 though.
The text was updated successfully, but these errors were encountered: