Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Jozef Sroka
ISPConfig 3
Commits
abd03574
Commit
abd03574
authored
Sep 20, 2016
by
Till Brehm
Browse files
Fix website quota issues #4176 and #4187
parent
c8667c4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/apache2_plugin.inc.php
View file @
abd03574
...
...
@@ -889,18 +889,19 @@ class apache2_plugin {
$file_system
=
$df_output
[
0
];
$primitive_root
=
$df_output
[
1
];
if
(
in_array
(
$file_system
,
array
(
'ext2'
,
'ext3'
,
'ext4'
,
'simfs'
,
'reiserfs'
),
true
)
)
{
exec
(
'setquota -u '
.
$username
.
' '
.
$blocks_soft
.
' '
.
$blocks_hard
.
' 0 0 -a &> /dev/null'
);
exec
(
'setquota -T -u '
.
$username
.
' 604800 604800 -a &> /dev/null'
);
}
elseif
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c 'limit -g bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
if
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c 'limit -g bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
// xfs only supports timers globally, not per user.
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'"
);
unset
(
$project_uid
,
$username_position
,
$xfs_projects
);
unset
(
$primitive_root
,
$df_output
,
$mb_hard
,
$mb_soft
);
}
else
{
if
(
$app
->
system
->
is_installed
(
'setquota'
))
{
exec
(
'setquota -u '
.
$username
.
' '
.
$blocks_soft
.
' '
.
$blocks_hard
.
' 0 0 -a &> /dev/null'
);
exec
(
'setquota -T -u '
.
$username
.
' 604800 604800 -a &> /dev/null'
);
}
}
}
...
...
server/plugins-available/nginx_plugin.inc.php
View file @
abd03574
...
...
@@ -747,18 +747,19 @@ class nginx_plugin {
$file_system
=
$df_output
[
0
];
$primitive_root
=
$df_output
[
1
];
if
(
in_array
(
$file_system
,
array
(
'ext2'
,
'ext3'
,
'ext4'
,
'simfs'
,
'reiserfs'
),
true
)
)
{
exec
(
'setquota -u '
.
$username
.
' '
.
$blocks_soft
.
' '
.
$blocks_hard
.
' 0 0 -a &> /dev/null'
);
exec
(
'setquota -T -u '
.
$username
.
' 604800 604800 -a &> /dev/null'
);
}
elseif
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c 'limit -g bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
if
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c 'limit -g bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
// xfs only supports timers globally, not per user.
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'"
);
unset
(
$project_uid
,
$username_position
,
$xfs_projects
);
unset
(
$primitive_root
,
$df_output
,
$mb_hard
,
$mb_soft
);
}
else
{
if
(
$app
->
system
->
is_installed
(
'setquota'
))
{
exec
(
'setquota -u '
.
$username
.
' '
.
$blocks_soft
.
' '
.
$blocks_hard
.
' 0 0 -a &> /dev/null'
);
exec
(
'setquota -T -u '
.
$username
.
' 604800 604800 -a &> /dev/null'
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment