I want to upload files to remote server via SSH.NET. Users login with their SSH credentials. And then I ask users where they're want to upload files. And then I need to check if there there are read/write permissions on this directory.
How can I check read/write permission on any directory?
I tried SftpFile.OwnerCanWrite
/OthersCanWrite
/GroupCanWrite
but these are not working for current login user.
foreach (var directory in directories)
{
if (!directory.Name.Equals(directoryName)) continue;
// I want to check here if is there read/write permission.
}