Skip to content

Commit 86dadaa

Browse files
committed
CLOUDSTACK-5489: Cloud user doesn't have permissions to copy systemvm.iso to secondary.
Make sure when a cifs (secondary) is mounted, uid is set for the user who owns the files and directories on the filesystem.
1 parent 880c87e commit 86dadaa

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,13 @@ protected String mount(String path, String parent, String scheme, String query)
234234
command.add("-t", "cifs");
235235
command.add(path);
236236
command.add(mountPoint);
237+
command.add("-o", "uid=`whoami`,gid=`whoami`");
237238

238239
if (query != null) {
239240
query = query.replace('&', ',');
240241
command.add("-o", query);
241242
}
243+
242244
result = command.execute();
243245
}
244246

0 commit comments

Comments
 (0)