1829748 Members
4015 Online
109992 Solutions
New Discussion

Re: File system

 
Nagashayana S.H.
Occasional Contributor

File system

1)what is the difference between ext2 and ext3?
2)why exactly file security is being used in linux os?what exactly a user has to follow in file security maintainance?
2 REPLIES 2
~sesh
Esteemed Contributor

Re: File system

1.
There is really only one difference between ext2 and ext3, and that is that ext3 uses a journal to prevent filesystem corruption in the case of an unclean shutdown (ie. before the filesystem is synced to disk). That makes ext3 a bit slower than ext2 since all metadata changes are written to the journal, and then flushed to disk, but on the other hand you don't risk having the entire filesystem destroyed at power failure or if a person turns the computer off uncleanly. You don't have to check the filesystem after an unclean shutdown either.

Ext3 has three levels of journalling. etadata (ie. internal filesystem structures) are always journalled, so that the filesystem itself is never corrupted. How ordinary data is written to the file system is controllable, though. The default option is the "ordered" mode, which causes file contents to be written to the filesystem before metadata is even committed to the journal. The highest reliable mode is called the "journal" mode, which causes file data to be committed to the journal before it is flushed to its final place, like the metadata. The least reliable mode, but rumoured to be the fastest, is called the "writeback" mode, which makes no promises at all regarding the consistency of file data. Only metadata is output reliably in writeback mode.

2.
Why security is being used is a difficult question to answer as such, but it is as simple as saying "because security is required on servers & even personal computers".

Every file / directory in Linux has 3 basic permissions, read, write, execute; represented as r, w, x. There are 3 basic types of users: owner, group & other; represented by u, g, o. Suppose you have created a simple text file called textfile. You will have all the rights as the owner (rwx), i.e. u = rwx. Group (g) may have read access only, i.e. g = r--. Others may also have read only rights; i.e. o = r--.

There are many web sites with detailed information about the file systems, file permissions. If you use google you will find numerous ones. This is just one of what I found.

http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html

Hope this helps.
dirk dierickx
Honored Contributor

Re: File system

1. wiki learns us;

The ext3 file system adds, over its predecessor:
* A journal
* Tree-based directory indices for directories spanning multiple blocks
* Online file system growth

now, the most lauded feature of ext3 is the journaling support.

http://en.wikipedia.org/wiki/Ext3

2. each current OS has file level security. it is basic policy to do this on multi user systems, such as unix.
it requires no maintenance, a default install of a modern linux system will have good default file security settings.

you might as well ask why people put locks on doors.