I currently have a SMB/CIFS network share which I have mounted under /var/inbound to receive files via SFTP. Here is what I have in my /etc/fstab:
//somename.file.core.windows.net/inbound /var/inbound cifs vers=3.0,username=somename,password=AccessKeyThatEndsWith==,dir_mode=0777,file_mode=0777
Now I want to have my users jailed at /var/inbound// and they would be uploading their files to /var/inbound//uploads.
Everything would work as expected if /var/inbound/ is just another directory in my Linux filesystem (I tested it). The issue starts when /var/inbound/ is in fact a mount of my SMB/CIFS network share. Users simply cannot connect using an SFTP Client (like FileZilla).
This all has to do with chown and chmod permission settings, and basically I need to be able to perform the following:
sudo chown testuser:sftponly /var/inbound/testuser/uploads sudo chmod ug+rwX /var/inbound/testuser/uploads
The above works perfectly with a Linux filesystem but (by design) it would not work with a SMB/CIFS fileshare -- which is why I am experiencing errors. I understand that there could be some mapping that I could do in order to get the desired result, but I have no idea on how to do that.