I am using Ubuntu to transfer data from an XFS-formatted drive to a HFS+ formatted drive over USB. Problem is whatever I do, these files get write-protected and I cannot change their permissions.
I am aware that the default UID of Ubuntu is 1000 where it is 501 on Mac, so I changed my Ubuntu UID to 501 as described in this guide.
Now the permissions seems right, and when I do a ls -n
, I am told that the UID is 501 and the group is 20 and the permissions are rwxrwxrwx
, which is exactly the same as on my other USB-drive which is working perfectly.
But for some reason I still cannot edit the files. I am told to authenticate and when I do so, nothing happens.
If I copy the files to some other volume in Finder, they are no longer write-protected, which makes me think that there could be something fishy about the USB-drive I am copying to. I had to format it HFS+ (non journaled) for Ubuntu to be able to write to it.
Could that mean something? Files copied to the volume from Finder on the Mac are not locked, but files copied through Ubuntu are.
Just did some further testing and realized that a sub-folder of one of the folders I had copied contained some pictures which I could write to without problems, but video-files at the same level as the original folder where all locked... both the video-files and the pictures had 501/20 as ownership/group. Also a few of the files which where locked actually had the "locked"-badge on them, and I was able to remove the checkmark in the properties of the file, but nothing happened and when I checked properties again, it was still there. But then again - other video-files which where locked did not have the badge in the first place... something is genuinely messed up here??!
Btw. I am regularly testing everything out on another Mac running Snow Leopard Server and the issues are the same.
Last update:
Tried doing rsync over ssh as suggested below, tried renaming the user in ubuntu so that both the username, the "long name" and the UID matches OSX - no progress.
Spent the last 14 hours trying to solve this - tired, going to bed now. Last resort is to copy everything of the ubuntu disk as it is now and then copy it to another USB-drive from the mac (when I copy back and forth between the desktop issues seems to be solved). Only drawback is that I need to go buy another hard drive to copy the 1.5TB off the ubuntu box and spend another 2 days copying files :-/
Final solution:
Since none of the suggestions people came up with here managed to solve the problem, I ended up buying another 2TB hard drive, copied the files from ubuntu to the HFS-formatted disk, connected 2 drives to my mac and copied the files again from the HFS-formatted disk to a HFS (journaled)-formatted disk. Problem solved. As I found the only way around this was to copy files around in the mac environment. Once a file had been copied once, the permission-issues where solved.
getfacl .
? --