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
addf2aea
Commit
addf2aea
authored
Sep 27, 2016
by
Till Brehm
Browse files
#4212
Chown backup file to web user when it is made available.
parent
2c3351e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/backup_plugin.inc.php
View file @
addf2aea
...
...
@@ -87,6 +87,7 @@ class backup_plugin {
if
(
file_exists
(
$backup_dir
.
'/'
.
$backup
[
'filename'
])
&&
file_exists
(
$web
[
'document_root'
]
.
'/backup/'
)
&&
!
stristr
(
$backup_dir
.
'/'
.
$backup
[
'filename'
],
'..'
)
&&
!
stristr
(
$backup_dir
.
'/'
.
$backup
[
'filename'
],
'etc'
))
{
copy
(
$backup_dir
.
'/'
.
$backup
[
'filename'
],
$web
[
'document_root'
]
.
'/backup/'
.
$backup
[
'filename'
]);
chgrp
(
$web
[
'document_root'
]
.
'/backup/'
.
$backup
[
'filename'
],
$web
[
'system_group'
]);
chown
(
$web
[
'document_root'
]
.
'/backup/'
.
$backup
[
'filename'
],
$web
[
'system_user'
]);
chmod
(
$web
[
'document_root'
]
.
'/backup/'
.
$backup
[
'filename'
],
0600
);
$app
->
log
(
'cp '
.
$backup_dir
.
'/'
.
$backup
[
'filename'
]
.
' '
.
$web
[
'document_root'
]
.
'/backup/'
.
$backup
[
'filename'
],
LOGLEVEL_DEBUG
);
}
...
...
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