From 64c251adf6ee4eec379fecf77a6fb417fc68d7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 22 Sep 2017 10:21:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20vers=3D1.0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BC=D0=BE=D0=BD=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20cifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * по умолчанию начиная с ядра 4.13 cifs монтируется версией 3.0, которая возможно пока не поддерживается calculate-server. В итоге все файлы получают права по умолчанию: 755 и при синхронизации профиля правильные права пропадают. --- pym/client/client.py | 8 +++++--- pym/client/variables/client.py | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pym/client/client.py b/pym/client/client.py index 97f0f9c..d48723b 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -287,17 +287,19 @@ class Client(commandServer, encrypt, Desktop): else: nomapposix = ",nomapposix" cache_method = self.clVars.Get('cl_cifs_cache') + cifs_mount_vers = self.clVars.Get('cl_cifs_mount_vers') if not uid is None: # mount by uid p = process(mountCmd, "-t", "cifs", "-o", - "cache=%s,user=%s,uid=%d,gid=%d,noperm%s" % ( - cache_method, userName, uid, gid, nomapposix), + "cache=%s,vers=%s,user=%s,uid=%d,gid=%d,noperm%s" % ( + cache_method, cifs_mount_vers, userName, uid, gid, nomapposix), "//%s/%s" % (host, res), rpath, envdict={"PASSWD": userPwd}, stderr=STDOUT) return p.success() else: p = process(mountCmd, "-t", "cifs", "-o", - "cache=%s,user=%s%s" % (cache_method, userName, nomapposix), + "cache=%s,vers=%s,user=%s%s" % (cache_method, + cifs_mount_vers, userName, nomapposix), "//%s/%s" % (host, res), rpath, envdict={"PASSWD": userPwd}, stderr=STDOUT) return p.success() diff --git a/pym/client/variables/client.py b/pym/client/variables/client.py index 6fc18d6..0aa9b92 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -743,6 +743,12 @@ class VariableClCifsCache(Variable): """ value = "loose" +class VariableClCifsMountVers(Variable): + """ + Параметр vers= для cifs + """ + value = "1.0" + class VariableClRsyncVer(ReadonlyVariable): """