I've spent days and days trying to figure this out, but still can't. I think I've read every article on this and tried all there is to try, and I still can't copy any file from my mac-formatted hfs+ external drive. Sorry if there's still an article I've missed.. I have disabled journaling and tried all the hfsprogs commands I could find, but still whenever I click on a folder on the external and try to copy it to my home directory, I get this: "The folder xxx cannot be handled because you don't have permission to read its content." I then found an article about inoring this by copying files through the Terminal. When trying to run the sudo cp -r command in the Terminal with my external drive path, I always get 'no such file or directory'.. Does anyone have another suggestion for me? Thanks in advance!
I had come across a similar issue when an old imac ppc g5 logic board went on me. I had alot of data on that hard drive that I had lost access to so I pulled the hard drive out and hooked it up to a hdd external case. When I tried to copy files from it to my Ubuntu box I got a permissions error. I tried alot of different things to rectify but to no avail. Alas.. The following should get you out of the woods.
open up terminal and type:
Using the GUI window that opens. Navigate to the directory where your files are located and copy the files you want then using the same nautilus GUI window navigate to the directory they are to be copied to and paste to that directory. Rinse & repeat.
bindfs is the answer. It will take an already mounted file system and provide a view of it with whichever uid you'd like:
sudo apt-get install bindfs mkdir ~/myUIDdiskFoo sudo bindfs -u $(id -u) -g $(id -g) /media/diskFoo ~/myUIDdiskFoo
I know that several months passed since you asked this, but I just accomplish did it successfully and I'll post here for others. Besides turn off journaling first at all, it is capital equalize the UID and GUI; in MacOs your user is 501/20 and on Ubuntu 1001/99 or higher. Be careful, because you must let Ubuntu show user ID < 1000 - explained below - or in your next boot your user will not appear!
The complete guide are in this 2 links:
Multiplataform guide, including MacOs, Linux and Windows
By default, the first user in OS X has a UID of 501, but you can double check this by going into System Preferences in OS X, right-clicking on your user, and hitting Advanced Options. If your User ID is something different from 501, replace 501 with your other UID in the terminal commands below.
Boot into Linux (we're using Ubuntu in this example) and fire up the Terminal. First, we're going to add a temporary user, since we don't want to edit a user that we're currently logged into. So, run the following commands in the Terminal, hitting Enter after each one:
sudo useradd -d /home/tempuser -m -s /bin/bash -G admin tempuser sudo passwd tempuser
Type in a new password for the temporary user when prompted. Reboot and log in as tempuser. Then, open up the Terminal and type in the following commands, once again hitting enter after each one (and replacing yourusername with your Linux user's username):
sudo usermod --uid 501 yourusername sudo chown -R 501:yourusername /home/yourusername
This will change your Linux user's UID to 501 and fix your home folder permissions so that you still own them. Now, you should be able to read and write to both your Mac and Linux user's home folder, no matter what OS you're logged into.
You may also want to fix your login screen, since by default Ubuntu won't list users with a UID of less than 1000. To do this, just open a Terminal and run gksudo gedit /etc/login.defs and search for UID_MIN in the text file. Change that value from 1000 to 501, and when you reboot your user will be listed in the login screen.
Go to the post from the user Frobber
To access OSX partitions from the Linux side, the UID and GID must match the OSX UID and GID. During OSX install, the first user and OSX administrator is assigned UID 501 and GID 20. When a Linux system is installed, the user IDs start at 1000. We can change our user IDs to match the IDs for the MacOS from the Linux side. To verify our UID and GID on the Mac side, login, open a terminal and Type – id. The response will display the required information. The UID and GID cannot be changed for a user that is logged in. With Ubuntu we need to create a 'Temp' user with administrative privileges, and perform the procedure while logged in as the 'Temp'. The 'Temp' user will use sudo -i to change to root user. The following procedure is written for a system that has 'Root' user capabilities, and nano is the editor.. Note: All we are doing is changing the ID numbers and nothing else.
1.At the login screen, Key – control+alt+F1. Observe that we have entered console mode.
2.Log in as root, or the Temp user.
Edit the file /etc/login.defs. Type:
Find the value UID_MIN. Change it from 1000 to 501. Find the value GID_MIN and change it to 501. Save the file and exit. Key – control+x. Key – y. Press – return. Edit the file /etc/group. Type –
Find the line that displays dialout:20username); change the value 20 to be 99. Find the line that displays (username):1000: and change it to (username):20: Save the file and exit. Key – ctrl-x to exit nano. Key – y. Press – return.
Edit the file /etc/passwd. Type:
Find the line that displays (username):1000:1000real name),,,,/home/(username):/bin/bash and change it to be (username):501:20real name),,,,/home/(username):/bin/bash Save the file and exit. Key – control+x to exit nano. Key – y. Press – return. Change file permissions of the home folder. Type:
cd /home chown -R 501:20 (username)
Exit console mode. Key – control+alt+F7 Reboot.
If this did not work and you received a message stating that one of the files could not be changed, it is likely that you are still logged in as (username) somewhere on the system. Try rebooting and logging as temp at the Login Screen.
1Ideally you should include the relevant parts from the links you provided in the answer and cite the links as your source. Thank you! Jun 29, 2014 at 15:35
Ok. I thought that copy the text even if source is cited were a not good practice. Jun 30, 2014 at 18:27
OK. I'll do it. Jun 30, 2014 at 18:31