summaryrefslogtreecommitdiffstats
path: root/slackbook/html/filesystem-structure.html
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /slackbook/html/filesystem-structure.html
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'slackbook/html/filesystem-structure.html')
-rw-r--r--slackbook/html/filesystem-structure.html168
1 files changed, 168 insertions, 0 deletions
diff --git a/slackbook/html/filesystem-structure.html b/slackbook/html/filesystem-structure.html
new file mode 100644
index 000000000..843c07c5d
--- /dev/null
+++ b/slackbook/html/filesystem-structure.html
@@ -0,0 +1,168 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta name="generator" content="HTML Tidy, see www.w3.org" />
+<title>Filesystem Structure</title>
+<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
+<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
+<link rel="PREVIOUS" title="Virtual Terminals" href="shell-vt.html" />
+<link rel="NEXT" title="Permissions" href="filesystem-structure-permissions.html" />
+<link rel="STYLESHEET" type="text/css" href="docbook.css" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
+alink="#0000FF">
+<div class="NAVHEADER">
+<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
+cellspacing="0">
+<tr>
+<th colspan="3" align="center">Slackware Linux Essentials</th>
+</tr>
+
+<tr>
+<td width="10%" align="left" valign="bottom"><a href="shell-vt.html"
+accesskey="P">Prev</a></td>
+<td width="80%" align="center" valign="bottom"></td>
+<td width="10%" align="right" valign="bottom"><a
+href="filesystem-structure-permissions.html" accesskey="N">Next</a></td>
+</tr>
+</table>
+
+<hr align="LEFT" width="100%" />
+</div>
+
+<div class="CHAPTER">
+<h1><a id="FILESYSTEM-STRUCTURE" name="FILESYSTEM-STRUCTURE"></a>Chapter 9 Filesystem
+Structure</h1>
+
+<div class="TOC">
+<dl>
+<dt><b>Table of Contents</b></dt>
+
+<dt>9.1 <a
+href="filesystem-structure.html#FILESYSTEM-STRUCTURE-OWNERSHIP">Ownership</a></dt>
+
+<dt>9.2 <a href="filesystem-structure-permissions.html">Permissions</a></dt>
+
+<dt>9.3 <a href="filesystem-structure-links.html">Links</a></dt>
+
+<dt>9.4 <a href="filesystem-structure-mounting.html">Mounting Devices</a></dt>
+
+<dt>9.5 <a href="filesystem-structure-nfs.html">NFS Mounts</a></dt>
+</dl>
+</div>
+
+<p>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.</p>
+
+<p>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.</p>
+
+<div class="SECT1">
+<h1 class="SECT1"><a id="FILESYSTEM-STRUCTURE-OWNERSHIP"
+name="FILESYSTEM-STRUCTURE-OWNERSHIP">9.1 Ownership</a></h1>
+
+<p>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 <tt class="COMMAND">ls</tt> command:</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">%</samp> <kbd class="USERINPUT">ls -l /usr/bin/wc</kbd>
+-rwxr-xr-x 1 root bin 7368 Jul 30 1999 /usr/bin/wc
+</pre>
+</td>
+</tr>
+</table>
+
+<p>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 &#8220;<tt
+class="USERNAME">root</tt>&#8221; and the group &#8220;<tt
+class="USERNAME">bin</tt>&#8221; own this file.</p>
+
+<p>We can easily change the file owners with the <tt class="COMMAND">chown</tt>(1) (which
+means &#8220;change owner&#8221;) and <tt class="COMMAND">chgrp</tt>(1) (which means
+&#8220;change group&#8221;) commands. To change the file owner to <tt
+class="USERNAME">daemon</tt>, we would use <tt class="COMMAND">chown</tt>:</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">#</samp> <kbd class="USERINPUT">chown daemon /usr/bin/wc</kbd>
+</pre>
+</td>
+</tr>
+</table>
+
+<p>To change the group owner to &#8220;<tt class="USERNAME">root</tt>&#8221;, we would
+use <tt class="COMMAND">chgrp</tt>:</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">#</samp> <kbd class="USERINPUT">chgrp root /usr/bin/wc</kbd>
+</pre>
+</td>
+</tr>
+</table>
+
+<p>We can also use <tt class="COMMAND">chown</tt> to specify the user and group owners
+for a file:</p>
+
+<table border="0" bgcolor="#E0E0E0" width="100%">
+<tr>
+<td>
+<pre class="SCREEN">
+<samp class="PROMPT">#</samp> <kbd class="USERINPUT">chown daemon:root /usr/bin/wc</kbd>
+</pre>
+</td>
+</tr>
+</table>
+
+<p>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 <tt class="COMMAND">chown</tt>
+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:
+<var class="LITERAL">mr.jones@example.com</var>. 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, <tt class="COMMAND">chmod</tt>
+would interpret <var class="LITERAL">mr.jones</var> as user &#8220;mr&#8221; and group
+&#8220;jones&#8221;.</p>
+
+<p>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.</p>
+</div>
+</div>
+
+<div class="NAVFOOTER">
+<hr align="LEFT" width="100%" />
+<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
+cellspacing="0">
+<tr>
+<td width="33%" align="left" valign="top"><a href="shell-vt.html"
+accesskey="P">Prev</a></td>
+<td width="34%" align="center" valign="top"><a href="index.html"
+accesskey="H">Home</a></td>
+<td width="33%" align="right" valign="top"><a
+href="filesystem-structure-permissions.html" accesskey="N">Next</a></td>
+</tr>
+
+<tr>
+<td width="33%" align="left" valign="top">Virtual Terminals</td>
+<td width="34%" align="center" valign="top">&nbsp;</td>
+<td width="33%" align="right" valign="top">Permissions</td>
+</tr>
+</table>
+</div>
+</body>
+</html>
+