diff --git a/kiwi/boot/image/dracut.py b/kiwi/boot/image/dracut.py index 0ff4c6d3e38..9aa4f436459 100644 --- a/kiwi/boot/image/dracut.py +++ b/kiwi/boot/image/dracut.py @@ -235,6 +235,9 @@ def create_initrd( self.initrd_filename = os.sep.join( [self.target_dir, dracut_initrd_basename] ) + Command.run( + ['chmod', '644', self.initrd_filename] + ) def _get_modules(self) -> List[str]: cmd = Command.run( diff --git a/test/unit/boot/image/dracut_test.py b/test/unit/boot/image/dracut_test.py index 16dec193dd4..096b2ce7779 100644 --- a/test/unit/boot/image/dracut_test.py +++ b/test/unit/boot/image/dracut_test.py @@ -152,6 +152,9 @@ def test_create_initrd( 'LimeJeOS.x86_64-1.13.2.initrd', 'some-target-dir' ] + ), + call( + ['chmod', '644', 'some-target-dir/LimeJeOS.x86_64-1.13.2.initrd'] ) ] mock_command.reset_mock() @@ -172,6 +175,9 @@ def test_create_initrd( 'system-directory/foo', 'some-target-dir' ] + ), + call( + ['chmod', '644', 'some-target-dir/foo'] ) ]