I cannot understand the permission.

Source: Internet
Author: User
I cannot understand a permission issue. for details, refer to general Linux technology-Linux programming and kernel. Ask a permission-related question. I have done the same experiment in both cases, but I cannot understand it.

The cause is that I used a linux stb in my company to mount rootfs to a pc using nfs, and used the root user. then I used stb, create a file with vi on rootfs and save and exit. Then, check the file on the pc, and show that all people and groups are root.
However, when I log on to the pc as a non-root user and use vi to edit the file, a message is displayed, indicating that the file is a read-only file. after modification, the file is forcibly written, saved, and exited. Now, check this file, and the owner and group have become non-root users?
By the way, I have confirmed that the permission for this file is always-rwxr -- r --. should it be that only everyone has the permission to modify it? Others should be read-only.

According to my understanding, this type of permission file cannot be modified by others, right? Why can we use non-everyone to force modification? Isn't there any security?

At that time, I was wondering if the NFS logon mode was special. I did the same experiment on linux at home after work, and the results were consistent. I still can modify the results, after the modification, the owner and group are changed to the modifier.

I cannot understand this. could you give me some advice?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.