Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
6/30/13 6:32 PM
Languages
English
Related Discussions
In Mac OS X 10.5.2 I am unable to access all of the HP print opti... Mac OS X v10.5: Disk Utility error "unable to unmount disk." How can I change the greycloth login page on OSX 10.8 Mountai... How do I view the details of my spotlight results in OSX 10.8? Verifying and Repairing Permissions on Mac OS X 10.5 giving m...
More discussions
Related Articles
The remainder of this document contains more advanced information. Note: In Mac OS X 10.5 and later, while started up ("booted") from the Mac OS X 10.5 installation disc, a user's home directory permissions can be reset using the Reset Password utility. Warning: This document describes how you may modify permission settings by entering commands in the Terminal application. Users unfamiliar with Terminal and UNIX-style environments should proceed with caution. The entry of incorrect commands may result in data loss and/or unusable system software. Improper alteration of permissions can result in reduced system security and/or exposure of private data.
Mac OS X Server v10.5 Web Server: Troubleshooting Group Wiki issues iTunes: Missing folder or incorrect permissions may prevent authorization iTunes: Advanced iTunes Store troubleshooting About Disk Utility's Repair Disk Permissions feature Error messages appear when you download songs from the iTunes Store
Permissions Defined
Mac OS X incorporates a subsystem based on a UNIX-style operating system that uses permissions in the file system. Every file and folder on your hard disk has an associated set of permissions that determines who can read, write to, or execute it. Using the AppleWorks application and one of its documents as an example, this is what the permissions mean: Read (r--) You can open an AppleWorks document if you have the read permission for it. Write (-w-) You can save changes to an AppleWorks document if you have the write permission for it. Execute (--x) You can open the AppleWorks application if you have the execute permission for it. Also note that you must have execute permission for any folder that you can open; thus File Sharing requires execute permission set for other, world, and everyone for the ~/Public folder, while Web Sharing requires the same setting for the ~/Sites folder. When you can do all three, you have "rwx" permission. Permissions for a folder behave similarly. With read-only permission to a folder containing documents, you can open and read documents but not save changes or add new documents to the folder. Read-only (r--) permission is common for sharing files with guest access, for example.
http://support.apple.com/kb/HT2963?viewlocale=en_US&locale=en_US
Page 1 of 5
6/30/13 6:32 PM
Since each entity has its own permission, an example of a complete permission set could look like "-rwxrw-r--". The leading hyphen designates that the item is a file and not a folder. Folder privileges appear with leading "d," such as "drwxrw-r--". The "d" stands for directory, which is what a folder represents. Figure 2, below, depicts how this looks in the Terminal application.
http://support.apple.com/kb/HT2963?viewlocale=en_US&locale=en_US
Page 2 of 5
6/30/13 6:32 PM
from the user in the Finder. In these situations you can either start up into Mac OS 9 to locate the files and delete them, or you can use the Terminal application. Issues with emptying the Trash are much less likely to occur in Mac OS X 10.2 or later, since the Finder empties the Trash as the root user. However, issues may still occur with files on remote volumes for which your local root user has no special privileges. Warning: Typographical error or misuse of the "rm -rf" command can result in data loss. Insertion of a space in the wrong place could result in the complete deletion of data on your hard disk, for example. You may wish to copy and paste the commands below into a text editor to verify spacing. Follow these steps to delete Trash for the logged-in user: 1. Open the Terminal application. 2. Type: sudo rm -rf Note: Type a space after "-rf". The command does not work without the space. Do not press Return until Step 6. 3. Open your Trash. 4. Choose Select All from the Edit menu. 5. Drag all of your Trash into the Terminal window. This causes the Terminal window to automatically fill in the name and location of each item in your Trash. 6. Press Return. All of the items in your Trash are deleted. As an alternative method, you may execute these commands. The second and third commands will delete Trash belonging to other users. The commands are: Warning: Typographical error or misuse of the "rm -rf" command can result in data loss. Insertion of a space in the wrong place could result in the complete deletion of data on your hard disk, for example. You may wish to copy and paste the commands below into a text editor to verify spacing. Important: There is no space between "/" and ".Trash" or ".Trashes" below. sudo rm -rf ~/.Trash/ sudo rm -rf /.Trashes/ sudo rm -rf /Volumes/<volumename>/.Trashes/ Note: To end the sudo session, you should either execute the exit command, or log out of Mac OS X and then log back in. Respectively, this permanently deletes all files in the current user's Trash, the startup volume Trash, and the Trash for other volumes (if any). These commands cannot delete locked files. You have to unlock them first. Note: The sudo command can be used to temporarily obtain super user status and change permissions on files that otherwise could not be changed. However, it is only available if you are logged in with an administrator account, and it requires an administrator account user password for authentication.
http://support.apple.com/kb/HT2963?viewlocale=en_US&locale=en_US
Page 3 of 5
6/30/13 6:32 PM
Figure 2 Viewing permissions with Terminal In the Figure 2 example, any user can read "File Name1.ext", because the read bit (r) is set for others. But the file is only changeable by root because the write bit (w) is only enabled for the owner, which is root. If the file is not a system file and you would like to be able to modify it from your normal account, you could change the owner with the following command: sudo chown yourusername "File Name1.ext" The file is owned by root, not by the user logged in, so the "sudo" command gives you temporary root access. Replace yourusername with your account's short name. Space syntax: Be careful when typing spaces in file paths within the Terminal. In the example, the filename is enclosed in quotation marks because it contains a space. Alternatively, you can replace spaces with a backslash followed by a space. Without the quotation marks, the same command would be typed as: sudo chown yourusername File\ Name1.ext For more information on changing ownership, groups, and permissions, see the man (manual) pages for chown, chgrp, and chmod. You access man pages by executing "man <command_name>". For example: man chmod By default, man pages are displayed one at a time. To read the next page, press the Space bar. To exit the man page, press Q.
http://support.apple.com/kb/HT2963?viewlocale=en_US&locale=en_US
Page 4 of 5
6/30/13 6:32 PM
http://support.apple.com/kb/HT2963?viewlocale=en_US&locale=en_US
Page 5 of 5