Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
After reading the man page for "chmod" I didn't find "go" mentioned in the "Options" section...
For those of us who spoke octal and hex before stumbling across the symbolic syntax, this can look a little obscure, but from the chmod man page...
The format of a symbolic mode is [ugoa...][[+-=][perms...]...], where perms is either zero
or more letters from the set rwxXst, or a single letter from the set ugo. Multiple symbolic
modes can be given, separated by commas.
A combination of the letters ugoa controls which users' access to the file will be changed:
the user who owns it (u), other users in the file's group (g), other users not in the file's
group (o), or all users (a). If none of these are given, the effect is as if a were given,
but bits that are set in the umask are not affected.
The operator + causes the selected file mode bits to be added to the existing file mode bits
of each file; - causes them to be removed; and = causes them to be added and causes unmen-
tioned bits to be removed except that a directory's unmentioned set user and group ID bits
are not affected.
The letters rwxXst select file mode bits for the affected users: read (r), write (w), exe-
cute (or search for directories) (x), execute/search only if the file is a directory or
already has execute permission for some user (X), set user or group ID on execution (s),
restricted deletion flag or sticky bit (t).
So chmod go-rw simply unsets the read and write bits for group and other users, equivalent to chmod 700 (assuming owner all perms and none for anyone else).
It should also be noted that the x bit serves a different purpose on directories than on files. On directories it allows/prevents the given user from traversing or crossing (i.e. searching) into or beyond the directory, whereas on a file it is used as the executable bit. So for the OPs purposes, if I read it correctly, they may want to only set go-rw(x) on the specific files within a directory, but not on the directory itself as that might have unintended consequences.
Last edited by astrogeek; 08-19-2014 at 04:39 PM.
Reason: tpos, typs, typos...