X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2FPVE%2FCLI%2Fpct.pm;h=fb2ec709fde4ed7d8207ff76255ffb1f7bf3cb43;hb=893e40dec5b3a9e60ef2e4120852f798d1b634ff;hp=1c04329ff732499375878933d2590a111f6a23cb;hpb=3650ed50967c87f9e4070e53ff777e0f141a37e6;p=pve-container.git diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm index 1c04329..fb2ec70 100755 --- a/src/PVE/CLI/pct.pm +++ b/src/PVE/CLI/pct.pm @@ -369,7 +369,7 @@ __PACKAGE__->register_method({ }, perms => { type => 'string', - description => 'File permissions to use.', + description => "File permissions to use (octal by default, prefix with '0x' for hexadecimal).", optional => 1, }, }, @@ -388,6 +388,7 @@ __PACKAGE__->register_method({ my $dest = extract_param($param, 'destination'); my $perms = extract_param($param, 'perms'); + $perms = '0'.$perms if defined($perms) && $perms !~m/^0/; my $user = extract_param($param, 'user'); my $group = extract_param($param, 'group'); @@ -450,7 +451,7 @@ __PACKAGE__->register_method({ }, perms => { type => 'string', - description => 'File permissions to use.', + description => "File permissions to use (octal by default, prefix with '0x' for hexadecimal).", optional => 1, }, }, @@ -469,6 +470,7 @@ __PACKAGE__->register_method({ my $dest = extract_param($param, 'destination'); my $perms = extract_param($param, 'perms'); + $perms = '0'.$perms if defined($perms) && $perms !~m/^0/; my $user = extract_param($param, 'user'); my $group = extract_param($param, 'group');