I want to use SFTP to store backup of different applications in our Infrastructure and have deployed Ubuntu server which has built in SFTP. Everything works fine if I use local account and local directory to store backups.I have used below link to configure it
Now, to store backup, I want to mount NFS or CIFS share.
1) My initial challenge is that I cannot mount NFS/CIFS share without “Sudo”.
2) If I use kerbros authentication at NFS server level then I am not able to mount the share, may be because I am using “ Sudo"and NFS server does not authenticate that.I am not sure how to mount NFS share using LDAP credentials.
3) I am able to mount CIFS share using Sudo mount -t CIFS -O LDAPUsername Password, where username is the user who has permission on that CIFS share.
4) Now, as I have mounted the CIFS share on the server, I want to use LDAP account to copy data on CIFS share from application.
CIFS/NFS share - testbackup
Directory on which CIFS/NFS share is mounted - /sftp/backup
Path on which Application should store the backup - /sftp/backup/application1 (Similarly any other application is there then /sftp/backup/application 2 or 3 and so on)
I tired changing the ownership of /sft/backup directory to ldap account using "sudo chown LDAPusername /sftp/backup” but it does not change the ownership and still shows root account as owner.
I want LDAP user to have privileges on /sftp/backup directory and use that account to write backup under this directory remotely from the application.
Apologies, if I have missed something as I do not have much experience in managing linux based systems and configuring this for the first time.
SFTP stands for SSH File Transfer Protocol. As its name suggests, it's a secure way of transferring files to a server using an encrypted SSH connection. In a standard configuration, the SSH server grants file transfer access and terminal shell access to all users with an account on the system. In this tutorial, we'll set up the SSH daemon to limit SFTP access to one directory with no SSH access allowed on per user basis.