Defcon1-Header
Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

chmod - Using with FreeBSD

A word about permissions:
0 = no operations allowed
1 = execute permission or the ability to cd in the case of a directory
2 = write permission
4 = read permission

Every file has permissions for owner, group, and world.

To define the permissions you want for a file, add up the bits you want each
class to have and then chmod the file.

e.g. Your home directory will have permissions 711 by default.
These permissions mean the following:
7 = 4+2+1:You (the owner) can read/write/execute
1 = 1:Other users in your group can cd/execute but not read or write
1 = 1:Other users not in your group can cd/execute but not read or
write


your public_html directory with permissions 755:
7 = 4+2+1:   You (the owner) can read/write/execute
5 = 4+1:    Other users in your group can cd/execute/read but not write
5 = 4+1:    Other users not in your group can cd/execute/read but not write

Files that you create in the public_html dir must have at least permissions
644 (directories must be 755) or the WWW server will not be able to read
them and they will not be "on the World Wide Web".

To change permissions on a file names test.html you would type
chmod 644 test.html

To make the directory images and all its files world readable you would
chmod 755 images
cd images
chmod 644 *

To keep the contents of a file hidden, chmod 700 file.

For more info on chmod, type man chmod


  Chmod StuFF By Big

© 1997 - 20013 Defcon1, www.defcon1.org , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.

Defcon1-Header2
Tool-Bar-2Defcon1  Webmail