-   Linux - Desktop (
-   -   Permissions between Mac OS X Snow Leopard and Linux Ubuntu 9.10 (

riganta 02-13-2010 08:18 AM

Permissions between Mac OS X Snow Leopard and Linux Ubuntu 9.10
Hi guys,

First of all apologies if I am posting in the wrong department but I have an issue with permissions under linux Ubuntu 9.10 with an external HDD. This external HDD was formatted with GUID partition table back in the days when I was still using Mac OS X. Now I have moved to linux Ubuntu 9.10 on my laptop. The problem is, when I connect that external HDD to my new laptop running Linux Ubuntu 9.10, I have permissions issues. All the Directories and sub-folder are read only, and permission-wise, I am unable to change them as it seems that I am not the owner anymore of any Directories and sub-folder. The weird thing is that when I cd into one the directory " movies" for example, I have "drwxrwxrwx" user 99. When I use the GUI to move folders and files in or out, I have " the destination is read-only"

I really need your help on this as I have pictures from a couple of years back amounting to about 600GB. I hope I wont have to reformat the drive completely.

PS: I did manage to get my hands on a Mac, I did change the permissions to everybody " read & write" on the Mac, but that did not help at all on the linux box. When I connect the HDD to a Mac, I have no issues at all with permissions.



tredegar 02-13-2010 11:06 AM

I don't think the GUID partition is the problem, because you can at least read the files.

What filesystem is this partition formatted with?

riganta 02-13-2010 02:56 PM

it is formatted in HFS +

I did try that to edit fstab that way but to no avail really. All it did was to not mount any more the HFS+ partition.

" /dev/sdb3/ /media hfsplus user, auto, uid=1000, gid=1000 0 0"

- /dev/sdb3 is the path to the drive's partition
- "/media" is the location i want to mount the drive at
- "hfsplus" is the partition type
- "users" allows a normal user not just root to mount this drive
- "auto" : mounts automatically when booting
- "uid" is my user's ID
- "gid" is my user's id
- The first zero tells it not to back it up. The second 0, tells it: "do not check (fsck)"

PS: It really looks like I am gonna have to reformat it :(

Kind Regards,

riganta 02-14-2010 07:49 AM

I think I have found the reason why directories and files are "read-only" on my linux box with all the right permissions to be writable; this not being the case in Mac OS X.

- The issue is, directories and files are all set to user "unknown" UID 99.
- Apparently, linux does not handle user "unknown" UID 99 with the right permissions given to directories and folders to start with.
- Any given directories or folders with user "unknown" UID 99 created in Mac OS X, would be handle by Linux with read-only permission. No matter what the ACLs would be on those respective directories or files.
- "ls -la" on any of my directory and files would return "rwxrwxrwx". That would indicate to me enough permissions to write and/or move files and folders.
- From a Mac OS X perspective, that user "unknown" UID 99 seem to have been created to simplify the sharing of external devices between computers. Here is a blog that explains it very well -->

I may have found an explanation for this issue, but I still don't know how to solve it...:(
I still haven't given up finding a solution as I would be loosing couple of years of pictures of my kids and family.

Kind Regards,

jschiwal 02-14-2010 09:03 AM

Post the mount command you tried.
Do you have the hfs kernel modules loaded?

Use "sudo file -s <device node>" to learn more about the filesystem.
Does it indicate something like ufstype=bsd44?

Copying your photos to another drive would be a good idea anyway, in the case that the hard drive itself goes bad. Maybe a long term project to copy, organize and tag the ones you really value. Then back them up to another medium as well or off site.

tredegar 02-14-2010 12:23 PM


I did try that to edit fstab that way but to no avail really. All it did was to not mount any more the HFS+ partition.

"/dev/sdb3/ /media hfsplus user, auto, uid=1000, gid=1000 0 0"
The hfsplus line in fstab isn't quite right - there should be no spaces after the commas. And I am not sure that the uid= gid= options are available for hfsplus ( man mount says, nothing ), so try defaults instead. Or you can give it a try once you have corrected the commas.

Try this line instead in /etc/fstab :

/dev/sdb3/  /media/hfsplus  hfsplus  users,auto,defaults  0  0
Note in the above, that I have changed the name of your mountpoint, and no space after the commas. Read on for the reason (I want you to chmod it, but not /media ).
Then you need to make sure the hfsplus module is loaded:

sudo modprobe hfsplus
Then try mounting it (no need to reboot)

mkdir /mount/hsfplus
chmod 777 /mount/hfsplus
sudo mount /dev/sdb3

How does that make the mountpoint look. Any errors listed?

If the files are still being listed as owned by UID 99 then you can just chown them ( but then you'd have to chown them back for it to work on the mac ) :

sudo -i    # become, then stay as root
cd /media/hfsplus
pwd        # make really sure you are in the right directory, (or maybe you'll damage your system)
chown yourself:yourself  -R  .

That line does NOT say chown yourself:yourself -R .* ( which will damage your system )
Obviously, put your username and groupname instead of yourself:yourself

Another option would be for you to create a new user with a UID of 99
They should have no trouble accessing the drive.

riganta 02-15-2010 08:23 AM

Thank you so much for all your help.
Unfortunately, none of the proposed solution worked. The user "unknown" UID 99 was still present every time and was messing the ACL I had to reformat the whole HD after a full back-up of my stuff. The backup was not easy as under linux I could not because of read-only ACLs. I had to get my hands on a Mac to do it.
I then proceeded to reformat my drive ( 1TB Seagate Pro). I wanted to use "ext 4" but I could not manage to do it under GParted :( It hanged every single time and froze my system. I reverted back to HFS but this time non-journaled. Guess what: The user "unknown" UID 99 is still there but this time I could changed the ACLs in the Mac and put read and write access to user "everybody" and apply to all enclosed folders and sub-folders. I went back to my Linux box and everything seems to be working fine this time. I did not lose any pictures, but the most frustrating is not being able to understand what happened...:)

Thank you guys again for your help on this

GOD Bless

SendDerek 02-24-2010 10:38 PM

Just another thought, it could be off. I have a dual-boot setup on my macbook and I jotted down some notes about sharing files between Mac and Linux ( For me, all it took to share the files was to change my UID from 500 to 501 in Linux. It was really as simple as 'usermod -u UID username'.

riganta 03-16-2010 05:24 PM

finally got it:
all my partitions are mounted in /media by default; /media is root. I did alt + f2 and then gksudo nautilus and my problem was solved. Thanks guys for your help.

tredegar 03-16-2010 06:05 PM


all my partitions are mounted in /media by default
That is OK.

/media is root
No, it's not. You have misunderstood something.

I did alt + f2 and then gksudo nautilus and my problem was solved.
I would not advise running a GUI file manager as root, but you are free to do as you please, and accept the risks.

If you are running a file manager as root, then of course you can move any files anywhere.

riganta 03-17-2010 02:49 AM

I just checked and it is not root as you said; but then what is happening ? This is getting really confusing. I created another partition with gparted ext 3 on my external drive and I had the same issue as the HFS+. The partition was mounted read only in /media. This would mean that through Nautilus I am not the owner of my partitions in that external drive but only root is; which is not the case because I checked and I have all the permissions necessary on the partition(s) but also on the the whole external drive: rwrwrw.
If any Guru could shed some light here, that would be very much appreciated. What am I doing wrong ??

Cheers Guys,

PS: I know you are right about running a file manager in root, but for the moment I have no other alternatives...

riganta 03-17-2010 06:35 PM

I have it now :)
$ sudo chown myuser /path/to/patition -R
The -R switch effectively added my user with read and write permissions.
That did not work on the HFS+ partition. Since that one is giving so much issue, I will erase it and convert it to ext3 like the rest of them.

All times are GMT -5. The time now is 11:52 PM.