[n00b@localhost] wrote:I am looking for the syntax for a find command that will change the permissions of all files to 600 and directories to 700 under my home directory.
Code: Select all
cd $HOME
find . -type d -print0 | xargs -0 chmod 700
find . -type f -print0 | xargs -0 chmod 600
man find is your friend, this wasn't a tough one.

If you have any executable scripts or programs anywhere beneath in your home directory, that will temporarily break them....
Not to knock Red Hat or anything but I don't really see the point in their one user per group system. Doesn't that defeat the purpose of groups altogether seeing as the group permissions on any file would have no effect (since a group is a user and vice versa)?
No. The idea is to give control over group membership to administrators (at the system and group level) and leave responsibility for group file access in the hands of the group members. Administrators create additional groups as needed to suit the organization (
e.g., research, devel, dba, sales,
etc.), add users to those groups and possibly change a user's default group to an organizational one. Since a new user doesn't belong to any groups but his own, this also places very tight constraints on new/untrusted users.
Users are expected to change the group ownership of files and directories they wish to share with a particular group, and manage permissions as well. In conjunction with a umask that denies world access, this approach ensures all new files are private by default, even in shared directories.
It's a model that works best in larger organizations, where segregation by role actually matters and there really is a concept of a new and untrusted user. It also is more suited to a somewhat savvy user base that understands the UNIX permission model tolerably well.
And then in practice, people just run
chmod 777 on every file they want to share.
