better chattr detection for disk enforcement limit
better chattr detection supported by both ubuntu, rocky linux, alma linux and centos
This commit is contained in:
parent
6b9a9dc457
commit
9e7b9466c9
|
|
@ -386,9 +386,9 @@ class FileManager:
|
|||
|
||||
command = 'touch %s/public_html/hello.txt' % (self.homePath)
|
||||
result = ProcessUtilities.outputExecutioner(command)
|
||||
result_lower = result.lower()
|
||||
|
||||
|
||||
if result.find('cannot touch') > -1:
|
||||
if 'cannot touch' in result_lower or 'no such file or directory' in result_lower:
|
||||
RemoveOK = 0
|
||||
|
||||
command = 'chattr -R -i %s' % (self.homePath)
|
||||
|
|
@ -454,8 +454,9 @@ class FileManager:
|
|||
|
||||
command = 'touch %s/public_html/hello.txt' % (self.homePath)
|
||||
result = ProcessUtilities.outputExecutioner(command)
|
||||
result_lower = result.lower()
|
||||
|
||||
if result.find('cannot touch') > -1:
|
||||
if 'cannot touch' in result_lower or 'no such file or directory' in result_lower:
|
||||
RemoveOK = 0
|
||||
|
||||
command = 'chattr -R -i %s' % (self.homePath)
|
||||
|
|
|
|||
Loading…
Reference in New Issue