Translate

Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Modern Operating Systems (3rd Edition)
Image of Beginning Google Maps API 3
Image of Android Wireless Application Development

GNU chmod Oddities and Factoids

This blog post will be a living post detailing some of the more interesting oddities and factoids about the GNU Coreutils version of the chmod command which comes with all current Linux distributions. Expect this post to be updated from time to time. Numeric Values and Special File Permission Removal Special Unix file permissions are the setuid, setgid, and sticky bits. I assume you know what these bits do so I am not going to waste your time describing the bits here in this post. Suffice to point out the bits have different meanings depending on whether they apply to

Recursively Change The UID:GID For Users Files

Fedora 17, changed the default starting UID and GID for regular users from 500 to 1000. See the 1000System Accounts project page for more information. So what is the best and easiest way to fix up existing files that might have lower UID and GIDs? It turns out that the GNU version of chmod has a very useful long option for doing exactly what we want. Suppose you wish to change all files with a UID/GID of 500:500 to a new UID/GID of 1000:1000, here is how to do it: chown -R –from=500:500 1000:1000 / chown -R –from=501:501 1001:1001 /