Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Linux removes the read-only attribute of fstab files

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Linux how to remove fstab file read-only attributes", the content is easy to understand, clear, hope to help you solve doubts, the following let Xiaobian lead you to study and learn "Linux how to remove fstab file read-only attributes" this article.

Experiments have been carried out to prohibit the execution of set bit programs and binary programs through the mount option.

[root@localhost~] # vi / etc/fstab/

# join

/ dev/sdc1 / var ext3 defaults,noexec 1 2

[root@localhost~] # mount-o remount / var

After the system restart found that / dev/sdc1 can not enter, can only enter the character interface.

I want to delete that line, but the read-only attribute is prompted when the file is saved.

Read-only file system

Experimental use

(1) chmod + w / etc/fstab

(2) W!

The file is still read-only and cannot be modified

Method

# mount-n-o remount,rw /

And then you can save it.

Restart the computer system and return to normal. The above problem is due to my own partition format.

Supplementary knowledge

/ etc/fstab contains information about your disk partition and how the storage device is mounted and where it is mounted

The first column contains the device name

The second column is its mount point.

The third column is its file system format

The fourth is mount parameters.

The fifth column [a number] is the dump option.

The sixth column [another number] is the file system check option.

The last two items in the file

1. The writable value of default (rw ro suid [a security mechanism] user [nouser] whether ordinary users can mount exec or execute binaries sync [async] sync is real-time write to hard disk, async is not real-time write, it can be written to memory first, which can be used in FTP)

2. 0 before 2000 means whether to back up, and 1 means whether to check for partition errors.

The above is all the content of the article "how Linux removes the read-only attribute of fstab files". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report