Prev | Current Page 221 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

For example, if you wanted to open permissions
completely to all files and directories in the /tmp/test directory, you could type the following:
$ chmod -R 777 /tmp/test
This command line runs chmod recursively (-R) for the /tmp/test directory, as well as any files or
directories that exist below that point in the file system (for example, /tmp/test/hat, /tmp/test/
hat/caps, and so on). All would be set to 777 (full read/write/execute permissions). This is not
something you would do on an important directory on a read/write file system. However, you might
do this before you create a directory structure on a CD-ROM that you want to be fully readable and
executable to someone using the CD-ROM later.
TIP
73
Running Commands from the Shell 2
The -R option of chmod works best if you are opening permissions completely or
adding execute permission (as well as the appropriate read/write permission). The reason
is that if you turn off execute permission recursively, you close off your capability to change to
any directory in that structure. For example, chmod -R 644 /tmp/test turns off execute permission
for the /tmp/test directory, and then fails to change any files or directories below that point.
Execute permissions must be on for a directory to be able to change to that directory.


Pages:
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233