Improve mkdir so that permissions will be forced:
SFTP will honor umask on server side, and new directories won't get expected permissions. We need to explicitly set permissions metadata for new entries.
This commit is contained in:
@@ -19,8 +19,8 @@ module Producer::Core
|
||||
context 'when a mode was given' do
|
||||
subject(:mkdir) { Mkdir.new(env, path, 0700) }
|
||||
|
||||
it 'creates the directory with given mode' do
|
||||
expect(remote_fs).to receive(:mkdir).with(anything, 0700)
|
||||
it 'changes the directory with given mode' do
|
||||
expect(remote_fs).to receive(:chmod).with(path, 0700)
|
||||
mkdir.apply
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user