Merge pull request #693 from midoks/dev

rsyncd同步-接收优化2
pull/694/head
Mr Chen 4 months ago committed by GitHub
commit 0dc2b635ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      plugins/rsyncd/index.py

@ -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']

Loading…
Cancel
Save