From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- misc/slackbook/html/filesystem-structure.html | 168 ++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 misc/slackbook/html/filesystem-structure.html (limited to 'misc/slackbook/html/filesystem-structure.html') diff --git a/misc/slackbook/html/filesystem-structure.html b/misc/slackbook/html/filesystem-structure.html new file mode 100644 index 000000000..843c07c5d --- /dev/null +++ b/misc/slackbook/html/filesystem-structure.html @@ -0,0 +1,168 @@ + + + + +Filesystem Structure + + + + + + + + + + +
+

Chapter 9 Filesystem +Structure

+ +
+
+
Table of Contents
+ +
9.1 Ownership
+ +
9.2 Permissions
+ +
9.3 Links
+ +
9.4 Mounting Devices
+ +
9.5 NFS Mounts
+
+
+ +

We have already discussed the directory structure in Slackware Linux. By this point, +you should be able to find files and directories that you need. But there is more to the +filesystem than just the directory structure.

+ +

Linux is a multiuser operating system. Every aspect of the system is multiuser, even +the filesystem. The system stores information like who owns a file and who can read it. +There are other unique parts about the filesystems, such as links and NFS mounts. This +section explains these, as well as the multiuser aspects of the filesystem.

+ +
+

9.1 Ownership

+ +

The filesystem stores ownership information for each file and directory on the system. +This includes what user and group own a particular file. The easiest way to see this +information is with the ls command:

+ + + + + +
+
+% ls -l /usr/bin/wc
+-rwxr-xr-x   1 root     bin    7368 Jul 30  1999 /usr/bin/wc
+
+
+ +

We are interested in the third and fourth columns. These contain the username and +group name that owns this file. We see that the user “root” and the group “bin” own this file.

+ +

We can easily change the file owners with the chown(1) (which +means “change owner”) and chgrp(1) (which means +“change group”) commands. To change the file owner to daemon, we would use chown:

+ + + + + +
+
+# chown daemon /usr/bin/wc
+
+
+ +

To change the group owner to “root”, we would +use chgrp:

+ + + + + +
+
+# chgrp root /usr/bin/wc
+
+
+ +

We can also use chown to specify the user and group owners +for a file:

+ + + + + +
+
+# chown daemon:root /usr/bin/wc
+
+
+ +

In the above example, the user could have used a period instead of a colon. The result +would have been the same; however, the colon is considered better form. Use of the period +is deprecated and may be removed from future versions of chown +to allow usernames with periods in them. These usernames tend to be very popular with +Windows Exchange Servers and are encountered most commonly in email addresses such as: +mr.jones@example.com. In slackware, administrators are advised +to stay away from such usernames because some scripts still use the period to indicate +the user and group of a file or directory. In our example, chmod +would interpret mr.jones as user “mr” and group +“jones”.

+ +

File ownership is a very important part of using a Linux system, even if you are the +only user. You sometimes need to fix ownerships on files and device nodes.

+
+
+ + + + + -- cgit v1.2.3