This article is for OS X as of 2014. For the current macOS, see here.
The instructions on this page are no longer applicable to current macOS versions on Apple Silicon. Changing permissions for the entire home folder can cause login issues and break apps.

On my MacBook Pro (OS X), I was doing some things in Terminal with root privileges when I suddenly noticed that every time I copied, moved, or renamed any files in a certain folder, the message "Finder wants to make changes. Type your password to allow this." started popping up.

I'd been doing a lot of things, so I wondered if the access permissions for this folder had changed somehow. I tried "sudo chmod -R 777 <filename>" and "chown," but it didn't revert back. Hmm, what's going on? I continued using it like that, but being asked for my password every time I worked was getting really annoying. So I did a quick Google search. I couldn't find a direct solution. Of course, simple methods like "right-clicking the file and re-granting permissions via 'View Details'" didn't work either.
So, I decided to investigate thoroughly. It turns out that, although the symptoms are slightly different, I found something on the Apple Japan support community that...When you try to put something in the trash, you'll be prompted for a password.I found this. From this, I guess it seems that OS X ACLs It appears that the Access Control Lists have gone haywire.
I messed around with quite a lot of things with root privileges. There might be other issues too... In that case, let's reset all the ACLs and start fresh! So I looked up how to reset ACLs on the Apple Japan community site, but I couldn't find a definitive solution. So I decided to check the official Apple US site...Support CommunitiesIf you go there,I found it easily.。
...Although the background explanation has become rather long, OS X ACLs The Access Control Lists (ACLs) have become corrupted, and to correct the issues described above, I will explain how to perform an ACL reset. Since I couldn't find any explanations in Japanese, I have described the solution with as many detailed steps as possible. Please note that this method cannot be stopped midway.
The following is a record from 2014. This is not possible on current macOS versions of Apple Silicon. The Command+R recovery screen and the "Reset Home Directory Permissions and ACLs" option are not available on current Macs.
1. (After backing up any important data as a precaution,) open the Terminal app, type the following, and press the return key. (Copy and paste recommended)
sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
2. You will be prompted for a password, so enter the password you use to log in to your Mac user account and press the return key. Wait a while until the next command is entered (the "$" sign will be displayed).
3. Once you are in command input mode, close the Terminal application and restart your Mac.(>Restart)To make someone do it.
4. As soon as it starts to boot, press the [command] and [R] keys simultaneously. Release the keys when the dial icon starts spinning on the gray screen.
5. The OS X Utilities window will open. From the menu bar, click Utilities > Terminal to launch the Terminal application.
6. Enter the following and press the return key.
resetpassword
7. The Reset Password window will pop up.

(A) Click on the boot volume, "Macintosh HD", (B) Select your username, (C) Leave the following three text input fields blank, and (D) Click the Reset button for "Reset Home Directory Permissions and ACLs".
8. Restart (>Restart).
With that, all ACLs were reset, and the problem was resolved.
By the way, there are also descriptions suggesting that this ACL mismatch symptom is an OS X bug (?) that has been known since the Mountain Lion era... Has Apple really left it unfixed for over two years?