hi linus guru,
Need your help, I would like to create ssh user that only has access to one folder
existing Directory: /home/aps/ logs
user can only have read only access on logs folder
Thanks, appreciate your help..
local_enable=YES chroot_local_users=YES
Match user alankoh X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp ChrootDirectory /home/%u
Match Group ftpusers ChrootDirectory /home/%u/ ForceCommand internal-sftp AllowAgentForwarding no AllowTcpForwarding no X11Forwarding no
[global] syslog = 0 log file = /var/log/samba/log.%m read raw = no write raw = no passdb backend = tdbsam workgroup = DOMAIN usershare allow guests = yes socket options = TCP_NODELAY pam password change = yes passwd program = /usr/bin/passwd %u unix password sync = yes obey pam restrictions = yes passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . server role = standalone server server string = %h server (Samba, Ubuntu) max log size = 1000 map to guest = bad user panic action = /usr/share/samba/panic-action %d dns proxy = no [Customer] force create mode = 755 browsable = yes public = yes path = /home/sftpuser/SFTP/Customer force directory mode = 755 writeable = yes valid users = @ftpusers force group = ftpusers write list = @ftpusers
total 4 drwxrwx---+ 2 sftpuser ftpusers 4096 Apr 9 11:35 Customer
sudo chown -R group:user /home/user