Cannot copy files from Mac to Samba

There is a new bug in MacOS 10.6.3 which presents problems when you copy files and directories from a Mac to any Samba server or NAS box using Samba or providing Windows (or CIFS or SMB) shares.

When you try to copy files and directories onto the Samba/NAS, you will get an error message about you not having permission.

The following workaround appears to work:

1. Copy all the files you want to put on the filestore into a new directory on your Mac, this just makes things easier. For this example we will call this directory "/Users/Jules/Documents/MyNotes".
2. Open the Applications folder in Finder, go into "Utilities" and run "Terminal".
3. Type the following commands exactly (even better: copy and paste them from here!), replacing the directory name with the location you used in step 1. Do not miss the dot at the end of 3 of the lines.
    cd /Users/Jules/Documents/MyNotes
    xattr -d -r .
    xattr -d -r .
    xattr -d -r .

You should now be able to copy your directory MyNotes over to the Samba server.

Resending Unix Mbox Files

Unfortunately someone screwed up the installation of one of our servers so that mail to local addresses was being delivered into /var/spool/mail/ instead of being sent onwards to our SMTP server.

Getting the correct was the easy bit, there is a simple
“null client” file I wrote years ago which does that nicely.

The hard bit was taking all the Unix mbox files in /var/spool/mail and /var/mail and re-delivering them all to their intended recipients. The bit most people get wrong is the separator between messages. The separator is
not a line starting with “From “. The separator is a blank line followed by a line starting with “From “. So I wrote my own script to do it which you are very welcome to download and use.

Windows 7 God Modes

In Windows 7, there are a whole bunch of shortcuts you can build to really useful places such as a Monster Control Panel, and other useful links that will save you a lot of searching.
To get access to these “God Modes”, all you need to do is open a “cmd” Command Prompt window, and paste in this bunch of commands:

cd \
mkdir GodModes
cd GodModes
mkdir "Monster Control Panel.{ED7BA470-8E54-465E-825C-99712043E01C}"
mkdir "Enter a default location.{00C6D95F-329C-409a-81D7-C46C66EA7F33}"
mkdir "Use biometric devices with Windows.{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}"
mkdir "Select a power plan.{025A5937-A6BE-4686-A844-36FE4BEC8B6D}"
mkdir "Select which icons and notifications appear on taskbar.{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}"
mkdir "Store credentials for automatic logon.{1206F5F1-0569-412C-8FEC-3204630DFB70}"
mkdir "Install a program from the network.{15eae92e-f17a-4431-9f28-805e482dafd4}"
mkdir "Choose the programs that Windows uses by default.{17cd9488-1228-4b2f-88ce-4298e93e0966}"
mkdir "Assembly Cache Viewer.{1D2680C9-0E2A-469d-B787-065558BC7D43}"
mkdir "Manage wireless networks.{1FA9085F-25A2-489B-85D4-86326EEDCD87}"
mkdir "Network.{208D2C60-3AEA-1069-A2D7-08002B30309D}"
mkdir "Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
mkdir "Devices and Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}"
mkdir "RemoteApp and Desktop Connections.{241D7C96-F8BF-4F85-B01F-E2B043341A4B}"
mkdir "Windows Firewall.{4026492F-2F69-46B8-B9BF-5654FC07E423}"
mkdir "Windows Explorer.{62D8ED13-C9D0-4CE8-A914-47DD628FB1B0}"
mkdir "System.{78F3955E-3B90-4184-BD14-5397C15F1EFC}”

Then just open “Computer” from the Start Menu, double click on C: then on “GodModes” and you will see the list. Double click on any one of them to see what it can do for you!