636
636
# the sgid bit is set, report a warning to the user
638
638
stat = self._get_sftp().lstat(abspath)
642
642
warning('About to chmod %s over sftp, which will result'
643
643
' in its suid or sgid bits being cleared. If'
644
644
' you want to preserve those bits, change your '
645
645
' environment on the server to use umask 0%03o.'
647
647
self._get_sftp().chmod(abspath, mode=mode)
648
648
except (paramiko.SSHException, IOError) as e:
649
649
self._translate_io_exception(e, abspath, ': unable to mkdir',