Merge pull request #693 from midoks/dev

rsyncd同步-接收优化2
This commit is contained in:
Mr Chen 2025-01-08 19:46:41 +08:00 committed by GitHub
commit 0dc2b635ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 3 deletions

View File

@ -730,9 +730,16 @@ def lsyncdAdd():
path = args['path']
if not mw.isAppleSystem():
os.system("mkdir -p " + path + " &")
os.system("chown -R www:www " + path + " &")
os.system("chmod -R 755 " + path + " &")
if os.path.exists(path):
import utils.file as utils_file
info = utils_file.getAccess(path)
file_chown = info['chown']
if file_chown != 'www':
return mw.returnJson(False, '建议手动执行命令: chown -R www:www '+ args_path)
else:
os.system("mkdir -p " + path + " &")
os.system("chown -R www:www " + path + " &")
os.system("chmod -R 755 " + path + " &")
conn_type = args['conn_type']