mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 13:56:01 +01:00
bug fix: permissions issue in file manager
This commit is contained in:
@@ -386,10 +386,10 @@ class FileManager:
|
|||||||
domainName = self.data['domainName']
|
domainName = self.data['domainName']
|
||||||
website = Websites.objects.get(domain=domainName)
|
website = Websites.objects.get(domain=domainName)
|
||||||
|
|
||||||
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, self.data['completePath'] + '/' + myfile.name)
|
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, self.returnPathEnclosed(self.data['completePath'] + '/' + myfile.name))
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
self.changeOwner(self.data['completePath'] + '/' + myfile.name)
|
self.changeOwner(self.returnPathEnclosed(self.data['completePath'] + '/' + myfile.name))
|
||||||
|
|
||||||
json_data = json.dumps(finalData)
|
json_data = json.dumps(finalData)
|
||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
@@ -421,7 +421,7 @@ class FileManager:
|
|||||||
|
|
||||||
ProcessUtilities.executioner(command, website.externalApp)
|
ProcessUtilities.executioner(command, website.externalApp)
|
||||||
|
|
||||||
self.changeOwner(self.data['extractionLocation'])
|
self.fixPermissions(domainName)
|
||||||
|
|
||||||
json_data = json.dumps(finalData)
|
json_data = json.dumps(finalData)
|
||||||
return HttpResponse(json_data)
|
return HttpResponse(json_data)
|
||||||
|
|||||||
@@ -193,6 +193,9 @@ class remoteTransferUtilities:
|
|||||||
command = "sudo scp -o StrictHostKeyChecking=no -i /root/.ssh/cyberpanel " + completedPathToSend + " root@" + IPAddress + ":/home/backup/transfer-" + folderNumber + "/"
|
command = "sudo scp -o StrictHostKeyChecking=no -i /root/.ssh/cyberpanel " + completedPathToSend + " root@" + IPAddress + ":/home/backup/transfer-" + folderNumber + "/"
|
||||||
subprocess.call(shlex.split(command), stdout=writeToFile)
|
subprocess.call(shlex.split(command), stdout=writeToFile)
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(command)
|
||||||
|
|
||||||
os.remove(completedPathToSend)
|
os.remove(completedPathToSend)
|
||||||
|
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user