Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 24. Managing Users and Groups > Advanced Concepts: Password Authenticat... - Pg. 287

Managing Users and Groups 287 Now that you're fluent with permissions, learning chmod is easy. To change the permissions on a file, log in as the root user and enter the following command: [root@insocoxygen /root]# chmod permissions file where permissions is a numeric value (three digits), discussed earlier, and file is the name of the file for which you want this to affect. For example, to set the index.html file to be changeable by the owner, but only readable by the file's group and the world, the command would be [root@insocoxygen /root]# chmod 644 index.html To recursively change the permissions on all the files in a specific directory, use the -R option in chmod. For example, to make all the files in /usr/bin set to the permissions 755, you would use [root@insocoxygen /root]# chmod -R 755 /usr/bin What are SetUID programs? SetUID is a special permission applied to programs. Remember how everything in Linux has an owner? This concept of ownership applies to programs in execution (processes) as well. Each process is owned by the person who invoked it. For example, if you log in as yourself, start the program xtetris, and then list the running processes using the ps command, you'll see that you are the owner of the xtetris process. But if you do a di- rectory listing on the xtetris program using ls -l, you'll see that the file itself is owned by the root user. Under normal circumstances, this is good. You want to make programs available to your