borodka_lenina: закоментил.
и поменял так:
ChrootDirectory /home/%u
после чего в winscp пишет
Доступ запрещён.
Код ошибки: 3
Сообщение ошибки от сервер: Permission denied
Apr 1 05:46:35 server1 sshd[1370]: Accepted password for user1 from comp1 port 20217 ssh2
Apr 1 05:46:35 server1 sshd[1370]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
Apr 1 05:46:35 server1 sshd[1374]: subsystem request for sftp
Apr 1 05:46:43 server1 sshd[1370]: pam_unix(sshd:session): session closed for user user1
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# Disable legacy (protocol version 1) support in the server for new
# installations. In future the default will change to require explicit
# activation of protocol 1
Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
# no default banner path
#Banner none
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
# Example of overriding settings on a per-user basis
Match User user1
#X11Forwarding no
#AllowTcpForwarding no
#PermitTunnel no
ForceCommand internal-sftp
ChrootDirectory %h
[root@server1 ~]# cat /var/log/secure
Apr 1 04:34:12 server1 sshd[1193]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
Apr 1 04:34:12 server1 sshd[1197]: subsystem request for sftp
Apr 1 04:34:12 server1 sshd[1197]: error: subsystem: cannot stat /usr/libexec/openssh/sftp-server: Permission denied
Apr 1 04:34:12 server1 sshd[1197]: subsystem request for sftp failed, subsystem not found
Apr 1 04:34:12 server1 sshd[1193]: pam_unix(sshd:session): session closed for user user1
Christian Lisov: что не так делаю:
useradd -G sftpusers -s /bin/bash -d /home/user7 user7
mkdir /home/user7
chown root:user7 /home/user7
chmod 750 /home/user7
#no default banner path
#Banner none
# override default of no subsystems
Subsystem ssh internal-ssh
#Subsystem sftp /usr/libexec/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
Match Group sftpusers
ChrootDirectory %h
ForceCommand internal-sftp
Александр: расширить / могу через ЛВМ, т.е. подключю другой диск и расширяю без проблем,
sda 8:0 0 10G 0 disk
+-sda1 8:1 0 500M 0 part /boot
+-sda2 8:2 0 7.5G 0 part
¦ +-VolGroup-lv_root (dm-0) 253:0 0 6.6G 0 lvm /
¦ L-VolGroup-lv_swap (dm-1) 253:1 0 992M 0 lvm [SWAP]
L-sda3 8:3 0 2G 0 part
тут не понятки именно в том что я расширил диск на ВиртуалБокс, и он показывает что сейчас 50Гб, но ОС не видит эти 50, т.е. не размеченные 40ГБ должен был увидеть, а как выше показано он видит всего 10.
это целая процедура, чтобы получить этот сертификат необходимо соответствовать требованиям, после чего внешний аудитор который имеет разрешение на аудит должен проверить вашу контору, и после этого если все гуд вы можете работать, почитайте тут pcidss.ru
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 1045 7875584 8e Linux LVM
fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 1045 7875584 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available
и поменял так:
ChrootDirectory /home/%u
после чего в winscp пишет
Доступ запрещён.
Код ошибки: 3
Сообщение ошибки от сервер: Permission denied
Apr 1 05:46:35 server1 sshd[1370]: Accepted password for user1 from comp1 port 20217 ssh2
Apr 1 05:46:35 server1 sshd[1370]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
Apr 1 05:46:35 server1 sshd[1374]: subsystem request for sftp
Apr 1 05:46:43 server1 sshd[1370]: pam_unix(sshd:session): session closed for user user1