Ticket #34954 (new defect)
user macports needs write access on Preferences directory
| Reported by: | nonstop.server@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | base | Version: | 2.1.1 |
| Keywords: | Cc: | egall@… | |
| Port: |
Description
The system log gets filled with messages from macports warning about a deny on file-write-create operations.
6/22/12 3:50:50.549 PM sandboxd: ([1231]) mdworker(1231) deny file-write-create /opt/local/var/macports/home/Library/Preferences/com.apple.LaunchServices.plist.lockfile
It seems the macports user (and it's processes) need write access on directory
- /opt/local/var/macports/home/Library/Preferences/
After granting user macports write access on the directory the following two files are created.
-rw------- 1 macports admin 58 Jun 23 00:47 com.apple.LaunchServices.plist -rwxr-xr-x 1 macports admin 0 Jun 23 00:47 com.apple.LaunchServices.plist.lockfile
Change History
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 4 Changed 8 months ago by nonstop.server@…
Replying to ob+macport@…:
To resolve this issue you need to grant the user macports write access to the Preferences directory.
You can achieve this by adding an ACL on this directory.
% sudo chmod +a "macports allow write" /opt/local/var/macports/home/Library/Preferences
After you added the ACL, the access mode and ACL on the Preferences directory should look like this:
% ls -dehl /opt/local/var/macports/home/Library/Preferences drwxr-xr-x+ 2 root admin 204B Jul 11 00:19 /opt/local/var/macports/home/Library/Preferences 0: user:macports allow add_file
comment:4 in reply to: ↑ 2 Changed 3 months ago by egall@…
Replying to nonstop.server@…:
Replying to ob+macport@…:
To resolve this issue you need to grant the user macports write access to the Preferences directory.
You can achieve this by adding an ACL on this directory.% sudo chmod +a "macports allow write" /opt/local/var/macports/home/Library/PreferencesAfter you added the ACL, the access mode and ACL on the Preferences directory should look like this:
% ls -dehl /opt/local/var/macports/home/Library/Preferences drwxr-xr-x+ 2 root admin 204B Jul 11 00:19 /opt/local/var/macports/home/Library/Preferences 0: user:macports allow add_file
MacPorts should be able to delete files from its Preferences directory, too, not just add them; otherwise you end up with a bunch of old plists littering the folder.


Same problem, how did you fix this?