开发者

On linux, using NFS, is the open() command executed remotely?

开发者 https://www.devze.com 2023-03-13 11:33 出处:网络
Assume there is a server on the network and the local machine is trying to open a file.Is open(\"A/B/C/D/E/filename\") implemented on the local system by something similar to this:

Assume there is a server on the network and the local machine is trying to open a file. Is open("A/B/C/D/E/filename") implemented on the local system by something similar to this:

  1. Local system first retrieves the directory contents of A from the server, which could fail for security reasons.

  2. Local system scans the dir for the inode of B.

  3. Repeat 1 & 2 recursively until reaching inode of filename.

  4. Local system finally calls the server to open the inode of the filename.

Or is open() handled entirely on the remote host.

I am trying to decide if opendir(dir), readdir() for a certain filename pattern, closedir(), 开发者_如何学JAVAand finally doing open(filename) is going to take the same amount of time as just open(filename).


Authentication checks in NFS run on the remote server. Proof? User "root" on the local system typically is mapped to user "nobody" on the remote system and has no privs. However, I cannot guarantee offhand that security checks do not ALSO happen on the local system.

0

精彩评论

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

关注公众号