New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #34954 (new defect)

Opened 11 months ago

Last modified 3 months ago

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:1 follow-up: ↓ 2 Changed 8 months ago by ob+macport@…

Same problem, how did you fix this?

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:3 Changed 3 months ago by egall@…

  • Cc egall@… added

Cc Me!

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/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

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.

Note: See TracTickets for help on using tickets.