Mac OS X automatically sets permissions to limit a user’s access to system files and other user directories. If that protection isn’t good enough, you can change permissions to prevent other users from doing stuff like editing your 'Great American Novel,' reading private financial documents, or opening a specific application.
![]()
As a general Mac user, hopefully you’ll never need to get into manually fixing permissions and ACL settings on files buried in your Mac OS. But if you do, what are the options?
There are plenty of instructions on the Internet giving the details of changing permissions in Finder and in Terminal. Terminal provides options more powerful that what Finder provides. But it’s complicated. I was looking for a free or cheap app to give me full control over permissions and ACL settings for any file on my Mac. I found exactly what I needed.
Introducing PropEdit
UPDATE: The developer of this app is kindly making it available free, as he is no longer developing it. I am using it on Mountain Lion 10.8.3 with no issues, to my knowledge. You can legally use the following key to register it: 0GYF-CMX2-49X3-B1VH-8CA9 – Thank you to Jonas for pointing this out in the comments.
PropEdit is a great tool for doing exactly what I described above. You can do all of the following with it, and more:
I was having issues with a file utilised by the Sparkle update system. I noticed it had something like 5 ACL entries for my user name, and I wanted to remove them and clear it up. Here’s a screen shot of PropEdit whilst I was access the file:
You’ll notice the ACL Editor button to the bottom right. That’s where I got access to the messed up ACL settings, cleaned them out, and set new ones.
Here is a picture of the built-in ACL editor:
PropEdit does cost $5, and there are numerous free alternatives to perform similar functions. None of the alternatives I tried were quite a polish and comprehensive as PropEdit, but if you only need to do a once-off repair I am sure these free apps will work just fine. Below are notes for apps I tried.
Other Options (all free)
There are quite a few applications providing the kind of functionality I have detailed for PropEdit. Here is a list:
BatChmod (free) – It doesn’t have a full ACL editor. But otherwise allows you to clear all ACL settings. It doesn’t allow for setting Flags. The following image shows what it can do:
ACL Fix (free) – solely for removing all ACL settings from a folder, file, or batch of files/folders. Nice and simple if you need to resolve ACL issues on folders copied into a system from a backup, for instance.
Sandbox (free) – This app is still not as nice as PropEdit. It does give access to full ACL editing though, and setting of standard permissions. The file browser it uses is not the default Cocao/OS X one, so it is not possible to use the Go To Folder keyboard shortcut. This means if you need to edit a deeply buried file, which you have already located in Finder, you can’t simply copy its full path and then use Go To Folder in Sandbox to jump directly there.
In my experience Sandbox is the best free option. Mac picture frame app download. It is almost as good as PropEdit, but without the $5 pricetag. If I was working with file permissions and ACL settings a lot, I would go with PropEdit. But otherwise I’d use Sandbox.
PrivilegeFix (free) – discontinued
Related articlesRelated
Home > Articles > Apple > Operating Systems
␡
< BackPage 7 of 11Next >
This chapter is from the book
Apple Training Series: Mac OS X Support Essentials v10.6: A Guide to Supporting and Troubleshooting Mac OS X v10.6 Snow Leopard
This chapter is from the bookThis chapter is from the book
Apple Training Series: Mac OS X Support Essentials v10.6: A Guide to Supporting and Troubleshooting Mac OS X v10.6 Snow Leopard
Managing Permissions via Command Line
Viewing and modifying file system permissions in the command line is both much richer and more complicated than in the Finder. The Finder has streamlined ownership, permissions, and ACLs, providing only the most common features that users require. However, the command line offers every conceivable ownership and permissions option. Further, the command line often provides more than one method for performing identical permissions tasks.
Viewing Traditional UNIX Permissions
Once again, the ls command is your primary tool for viewing file and folder information in the command line. The ls command has many options for viewing nearly any file or folder attribute. You can learn more about all the options available to ls from its manual entry page. Here, you will be presented with a few fundamental permissions viewing options.
The most basic ls option for viewing file and folder ownership and permissions is –l:
The first string of characters at the beginning of each line is shorthand for the item type and permissions. The following information appears from left to right: the number of hard links associated with the item (for most users, this particular bit will be trivial information), the assigned owner, the assigned group, the last modification date, and finally the item’s name.
The syntax for the abbreviated information section is:
The execute privilege attribute x has not been introduced yet, but it is the third standard UNIX privilege attribute after read and write. The execute privilege is enabled on files that are commands and applications (or folders that contain application bundles), to indicate that the item contains executable software code. The execute privilege is also required on normal folders to access the contents of the folder. The Finder doesn’t show you when the execute privilege is used, but it will properly manage the execute privilege when you make permissions changes using the Get Info window.
Viewing Access Control Lists (ACLs)
The ACL technology is more advanced than traditional UNIX-style permissions because it allows for an arbitrary number of user and group permissions rules per item. Each permissions rule is known as an Access Control Entry (ACE). Every file and folder on the system can have an unlimited list of ACE rules, hence the “list” in ACLs.
From the command line, Mac OS X’s ACL implementation provides more than a dozen unique privilege attribute types and lets you define each as a specific allow or deny rule. In other words, you can assign an item an unlimited number of user or group rules, or ACEs, which can be used to allow or deny any of the following privilege attributes:
Furthermore, each ACE for a folder can include a static inheritance rule that defines whether the folder’s permissions also apply to new items placed in the folder. Inheritance attributes include the following: no inheritance, apply to just new items in this folder, apply to any new child folders, apply to any new child files, and apply to all descendants of this folder.
To view an item’s ACLs alongside their permissions, simply add the -e option to the -l option:
Modifying File Permissions via Command Line
You will use two primary commands for changing file and folder permissions in the command line: chown for changing ownership and chmod for changing privileges.
Changing Ownership via Command Line
Short for “change ownership,” chown will let you change the owner and group associated with a file or folder. Using chown often requires root access, so this command is almost always preceded by the sudo command. To use chown, enter the new owner’s name, followed optionally by a colon and the new group name, and then finish with the item’s path. In the following example, Michelle will use the chown command to change testfile1’s ownership to the user account “kevin” and the group account “admin.” https://gbmrhoe.weebly.com/blog/allow-apps-downloaded-from-anywhere-mac-greyed-out.
Changing Privileges via Command Line
Short for “change file mode,” chmod will let you change the privileges associated with a file or folder. Using chmod on files you don’t own requires root access, so the chmod command is often preceded by the sudo command. To use chmod, enter the new privileges first followed by the item’s path.
As for changing privileges, there are two basic methods when using the chmod command:
In the following example, Michelle will use the chmod command to change the permissions of testfile1 and testfolder to allow read and write access for the owner and the group but read-only access for everyone else. She will first use alphanumeric abbreviations, and then octal privilege equivalents.
Using the Sticky Bit
As mentioned previously in this chapter, the /Users/Shared folder has a unique permission setting that allows all local users to read and write items into the folder yet prevents other users from being able to delete files that they didn’t originally put in this folder. This special permissions configuration is brought to you courtesy of the “sticky bit.” Essentially, enabling the sticky bit on a folder defines it as an append-only destination, or, more accurately, a folder in which only the owner of the item can delete the item.
You can clearly see the sticky bit setting of the /Users/Shared folder when you view its ownership and permissions. Note the t on the end of the permissions information, which indicates that the sticky bit is enabled:
You can enable sticky bit functionality similar to the /Users/Shared folder on any other folder using a special octal notation with the chmod command. In the following example, Michelle has already created a new folder named NewShared. She then uses the chmod command with +t to set sharing for all users with sticky bit functionality:
Managing Locked Items via Command Line
As mentioned previously, Mac OS X includes a special file system lock feature that prevents anyone but the owner of an item from making changes to that item. Any user can easily lock a file or folder he owns from the Finder’s Get Info window, also covered earlier in this chapter.
The problem with the file system lock is that the Finder prevents even other administrative users from making changes or even unlocking items they don’t own. In fact, this file system lock extends to the command line as well. Even with sudo access, an administrator is not allowed to change a locked item—with one important exception, the chflags command. This command allows the administrator to change file system flags, which among other things allows you to lock or unlock any file or folder on the system.
In the following example, Michelle needs to change the permissions of a folder owned by another user so the folder can be shared. However, even using sudo she is denied access from doing this, indicating the file is locked. She verifies this by using ls –lO to view the file listing with file flags, which indeed returns that the folder is locked, “uchg”. She then uses the chflags command with the nouchg option to unlock the folder. Finally, she is able to make changes to the previously locked file.
Related Resources
![]()
Setting Permissions On Mac
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |