开发者

Retrieve Unix folder structure and permissions using C#

开发者 https://www.devze.com 2023-01-25 02:26 出处:网络
As part of building an ASP.net application, I have to display two things for a specific user on an UNIX backend system:

As part of building an ASP.net application, I have to display two things for a specific user on an UNIX backend system:

  • the folder structure
  • the folder permissions (just notation like: drwxr-xr-x).

My knowledge of communicating to UNIX with C# is, however, very limited. I've discovered a few possiblities to accomplish this:

  • FTP, not sure though whether I will be able see the permissions
  • SSH, seems to be most common way to interact with UNIX from C# (command ls -ld should do)
  • RSH, less secure than SSH? Apart from security, what's difference with SSH开发者_如何学Go?

Questions:

  • What is the best way to interact to UNIX using C#, knowing only the above two things have to be displayed?
  • Perhaps some examples available somewhere (couldn't really find them yet)?

Thanks in advance.


This code project looks like it would do what you want. In fact I think the screenshot is doing exactly what you're describing.

http://www.codeproject.com/KB/IP/sharpssh.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号