Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
4bf3f93e
Commit
4bf3f93e
authored
Mar 21, 2010
by
tbrehm
Browse files
Fixed: FS#1116 - Cron error
parent
b103e5cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/cron_daily.php
View file @
4bf3f93e
...
@@ -186,9 +186,9 @@ if(is_array($records)) {
...
@@ -186,9 +186,9 @@ if(is_array($records)) {
foreach
(
$records
as
$rec
){
foreach
(
$records
as
$rec
){
$tmp_path
=
realpath
(
escapeshellcmd
(
$rec
[
"document_root"
]
.
'/tmp'
));
$tmp_path
=
realpath
(
escapeshellcmd
(
$rec
[
"document_root"
]
.
'/tmp'
));
if
(
$tmp_path
!=
''
&&
strlen
(
$tmp_path
)
>
10
&&
is_dir
(
$tmp_path
)
&&
$app
->
system
->
is_user
(
$rec
[
'system_user'
])){
if
(
$tmp_path
!=
''
&&
strlen
(
$tmp_path
)
>
10
&&
is_dir
(
$tmp_path
)
&&
$app
->
system
->
is_user
(
$rec
[
'system_user'
])){
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user "
.
escapeshellcmd
(
$rec
[
'system_user'
])
.
" | grep -v -w .no_delete | xargs rm &> /dev/null"
);
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user "
.
escapeshellcmd
(
$rec
[
'system_user'
])
.
" | grep -v -w .no_delete | xargs rm &>
/dev/null 2>
/dev/null"
);
if
(
$app
->
system
->
is_user
(
'www-data'
))
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &> /dev/null"
);
if
(
$app
->
system
->
is_user
(
'www-data'
))
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &>
/dev/null 2>
/dev/null"
);
if
(
$app
->
system
->
is_user
(
'wwwrun'
))
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &> /dev/null"
);
if
(
$app
->
system
->
is_user
(
'wwwrun'
))
exec
(
"cd "
.
$tmp_path
.
"; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &>
/dev/null 2>
/dev/null"
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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