From 2ec7fb05ebd5748a060068847b4b2c18e042f293 Mon Sep 17 00:00:00 2001 From: fxC Date: Sun, 21 Nov 2021 20:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/management/commands/services/services/base.py | 3 ++- fir_ser/requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fir_ser/api/management/commands/services/services/base.py b/fir_ser/api/management/commands/services/services/base.py index 81bd5be..de06a02 100644 --- a/fir_ser/api/management/commands/services/services/base.py +++ b/fir_ser/api/management/commands/services/services/base.py @@ -120,7 +120,8 @@ class BaseService(object): # -- action -- def open_subprocess(self): - self.set_work_dir_owner() + if os.getuid() == 0: + self.set_work_dir_owner() kwargs = {'cwd': self.cwd, 'stderr': self.log_file, 'stdout': self.log_file} self._process = subprocess.Popen(self.cmd, **kwargs) diff --git a/fir_ser/requirements.txt b/fir_ser/requirements.txt index efe2f92..7d5e8b8 100644 --- a/fir_ser/requirements.txt +++ b/fir_ser/requirements.txt @@ -19,4 +19,5 @@ drf-extensions==0.7.0 python-daemon==2.2.3 psutil==5.6.6 flower==1.0.0 -django-proxy==1.2.1 \ No newline at end of file +django-proxy==1.2.1 +uWSGI==2.0.20 \ No newline at end of file