Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
99e9ac79
Commit
99e9ac79
authored
Jun 03, 2015
by
Till Brehm
Browse files
Fixed: FS#3906 - Wrong home folder permisions after changing ssh username.
parent
3fb9be68
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/shelluser_base_plugin.inc.php
View file @
99e9ac79
...
...
@@ -233,7 +233,7 @@ class shelluser_base_plugin {
$app
->
system
->
chgrp
(
escapeshellcmd
(
$data
[
'new'
][
'dir'
]
.
'/home'
),
escapeshellcmd
(
$data
[
'new'
][
'pgroup'
]));
}
$app
->
file
->
mkdirs
(
escapeshellcmd
(
$homedir
),
'0750'
);
$app
->
system
->
chown
(
escapeshellcmd
(
$homedir
),
escapeshellcmd
(
$data
[
'new'
][
'user
name
'
]));
$app
->
system
->
chown
(
escapeshellcmd
(
$homedir
),
escapeshellcmd
(
$data
[
'new'
][
'
p
user'
]));
$app
->
system
->
chgrp
(
escapeshellcmd
(
$homedir
),
escapeshellcmd
(
$data
[
'new'
][
'pgroup'
]));
$app
->
system
->
web_folder_protection
(
$web
[
'document_root'
],
true
);
}
else
{
...
...
@@ -406,7 +406,7 @@ class shelluser_base_plugin {
if
(
$this
->
data
[
'new'
][
'chroot'
]
==
'jailkit'
)
{
$usrdir
=
escapeshellcmd
(
$this
->
data
[
'new'
][
'dir'
]);
}
else
{
$usrdir
=
escapeshellcmd
(
$this
->
data
[
'new'
][
'dir'
]
.
'/home/'
.
$data
[
'new'
][
'username'
]);
$usrdir
=
escapeshellcmd
(
$this
->
data
[
'new'
][
'dir'
]
.
'/home/'
.
$
this
->
data
[
'new'
][
'username'
]);
}
$sshdir
=
$usrdir
.
'/.ssh'
;
$sshkeys
=
$usrdir
.
'/.ssh/authorized_keys'
;
...
...
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