Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def install_azcopy(self, install_location):
else:
raise CLIError('Azcopy ({}) does not exist.'.format(self.system))
try:
os.chmod(install_dir,
os.stat(install_dir).st_mode | stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
os.chmod(install_dir, os.stat(install_dir).st_mode | stat.S_IWUSR)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems stat.S_IWUSR is set by default:

import os
import stat
install_dir = 'temp'
os.makedirs(install_dir)
print(bool(os.stat(install_dir).st_mode & stat.S_IWUSR))

Output:

True

stat.S_IWUSR is not explicitly set when downloading bicep CLI:

installation_dir = os.path.dirname(installation_path)
if not os.path.exists(installation_dir):
os.makedirs(installation_dir)

_urlretrieve(file_url, install_location)
os.chmod(install_location,
os.stat(install_location).st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
Expand Down