Oliver Nassar

Copying OSX music files over the network

November 03, 2012

A friend wanted to download a bunch mp3s, which are organized by artist and then by album, from me over the WiFi network.

Started running into a lot of permission issues, and I got down to the following command which resolve permission issues.

cd ~/Music/dir/
chmod 0755 *
find . -type d -exec chmod 0755 {} ;
find . -type f -name '*.mp3' -exec chmod 0644 {} ;
find . -type f -name '*.MP3' -exec chmod 0644 {} ;
find . -name '*.DS_Store' -type f -delete

I ran this command from a specific music directory that I have organized by artists. The commands, in order, perform the following:

  1. Move to the desired directory
  2. Make all the directories accessible/readable
  3. Make all subdirectories accessible/readable
  4. Make all files that end with mp3 readable
  5. Make all files that end with MP3 readable
  6. Delete all .DS_Store files, since sometimes these will have very low permissions that will prevent the entire directories contents from being downloaded (perhaps since they're listed as the first file)

Hope that helps :)