mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
This commit is contained in:
@@ -546,12 +546,18 @@ class FileManager:
|
|||||||
if self.data['fileName'].find(self.data['home']) == -1 or self.data['fileName'].find('..') > -1:
|
if self.data['fileName'].find(self.data['home']) == -1 or self.data['fileName'].find('..') > -1:
|
||||||
return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
|
return self.ajaxPre(0, 'Not allowed to move in this path, please choose location inside home!')
|
||||||
|
|
||||||
|
command = 'stat -c "%%a" %s' % (self.returnPathEnclosed(self.data['fileName']))
|
||||||
|
currentMode = ProcessUtilities.outputExecutioner(command).strip('\n')
|
||||||
|
|
||||||
command = 'mv ' + tempPath + ' ' + self.returnPathEnclosed(self.data['fileName'])
|
command = 'mv ' + tempPath + ' ' + self.returnPathEnclosed(self.data['fileName'])
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, self.data['fileName'])
|
command = 'chown %s:%s %s' % (website.externalApp, website.externalApp, self.data['fileName'])
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
command = 'chmod %s %s' % (currentMode, self.returnPathEnclosed(self.data['fileName']))
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
self.changeOwner(self.data['fileName'])
|
self.changeOwner(self.data['fileName'])
|
||||||
|
|
||||||
json_data = json.dumps(finalData)
|
json_data = json.dumps(finalData)
|
||||||
|
|||||||
Reference in New Issue
Block a user