Opened 12 years ago

Closed 8 years ago

#34954 closed defect (worksforme)

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: cooljeanius (Eric Gallager)
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 (5)

comment:1 Changed 12 years ago by ob+macport@…

Same problem, how did you fix this?

comment:2 in reply to:  1 ; Changed 12 years 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 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 in reply to:  2 Changed 12 years ago by cooljeanius (Eric Gallager)

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.

comment:5 Changed 8 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: newclosed

I do not see such messages in Console.app on macOS 10.12 Sierra. It does not seem to be actually necessary to write to this directory as it worked years without this.

Note: See TracTickets for help on using tickets.