2

I usually install Cyberduck by dragging the .app bundle into the Applications folder on the root of my hard drive (/Applications). However, on macOS versions 10.7 Lion and newer, if I later decide to move Cyberduck to my desktop, Finder will create an alias by default, instead of actually moving the .app bundle.

By contrast, if I instead install Cyberduck to my user Applications folder (~/Applications), and later attempt to drag Cyberduck to my desktop, the .app bundle will be moved like any other file.

What makes the /Applications folder so special? Is it possible to add the same behavior to another folder, or—if SIP is disabled—to modify /Applications to behave like a normal folder?


A couple things I have already tried:

  1. /Applications is owned by root:admin. However, sudo chown root:admin ~/Applications has no effect on dragging behavior.
  2. Inside of a test VM, I renamed /Applications to /Applications2. The renamed Applications2 folder retained the same dragging behavior as before, suggesting that the functionality is not hard-coded to a specific path.
  • Did you try creating a new folder called Applications? If so, which now gets the system icon? Best guess right now is changing its name isn't changing what may be 'special' about it [though that's simply a guess] – Tetsujin Feb 2 at 19:19
  • It is not the /Applications folder itself that controls this behavior per se, rather the permissions, extended attributes, ACL properties, etc. As an example, Apple apps have the com.apple.rootless extended attribute and 0: group:everyone deny delete ACL properties, while non-Apples usually only have the com.apple.quarantine extended attribute. Non-Apple apps can be moved while holding down the key while dragging. – user3439894 Feb 2 at 19:44
  • @user3439894 How do I apply these to other folders or remove them from /Applications/? SIP is off, so it should be modifiable, right? – Wowfunhappy Feb 2 at 20:01
  • @Tetsujin In my macOS 10.9 VM, a renamed /Applications2 folder loses its icon despite retaining its special dragging behavior. A user-created /Applications folder does not get an icon, and has standard dragging behavior. (I re-tested to check my memory, and my previous, now-deleted comment was party wrong) – Wowfunhappy Feb 2 at 20:05
  • 1
    Another difference with /Applications is its owner:group is root:admin vs. the typical root:wheel and has the sunlnk flag set. I'd assume this also adds to the differences between a user created folder. Use the following command in Terminal after cd /, ls -lOe@ and review the output of the various / (root) directories. Also, Apple apps in /Application have the restricted flag set as well. You can use chown to change the owner:group and chflags to set/unset the flags. – user3439894 Feb 2 at 22:04
0

Sadly, the premise behind this question was flawed. I originally posted this observation:

Inside of a test VM, I renamed /Applications to /Applications2. The renamed Applications2 folder retained the same dragging behavior as before, suggesting that the functionality is not hard-coded to a specific path.

Unfortunately, this only remains true until a restart of Finder. In other words, if I rename the /Applications to /Applications2, Applications2 will retain its special dragging behavior only until Finder is restarted! If I killall Finder, Applications2 will gain normal dragging behavior.

This also works in reverse—a user-created directory moved to /Applications will gain special dragging behavior when Finder is restarted.

So, I think it's safe to conclude that the behavior is hard coded to specific paths, and cannot be changed. I'm disappointed, but it does make sense. I do wonder if these hardcoded Finder paths are stored in a config file somewhere that could be changed... but knowing Apple, probably not.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .