diff options
Diffstat (limited to 'ironic/drivers/modules')
-rw-r--r-- | ironic/drivers/modules/redfish/boot.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ironic/drivers/modules/redfish/boot.py b/ironic/drivers/modules/redfish/boot.py index 43a2e9b50..bed9e91a9 100644 --- a/ironic/drivers/modules/redfish/boot.py +++ b/ironic/drivers/modules/redfish/boot.py @@ -394,12 +394,13 @@ def _publish_image(image_file, object_name): public_dir = os.path.join(CONF.deploy.http_root, IMAGE_SUBDIR) if not os.path.exists(public_dir): - os.mkdir(public_dir, 0x755) + os.mkdir(public_dir, 0o755) published_file = os.path.join(public_dir, object_name) try: os.link(image_file, published_file) + os.chmod(image_file, CONF.redfish.file_permission) except OSError as exc: LOG.debug( @@ -410,6 +411,7 @@ def _publish_image(image_file, object_name): 'error': exc}) shutil.copyfile(image_file, published_file) + os.chmod(published_file, CONF.redfish.file_permission) image_url = os.path.join( CONF.deploy.http_url, IMAGE_SUBDIR, object_name) |