[SOLVED] Permissions between Mac OS X Snow Leopard and Linux Ubuntu 9.10
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
- /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
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 --> http://unixjunkie.blogspot.com/2007/...9-unknown.html
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.
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.
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.
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:
Code:
sudo modprobe hfsplus
Then try mounting it (no need to reboot)
Code:
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 ) :
Code:
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 .
exit
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.
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...
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 (http://www.derekhildreth.com/blog/fe...minum-51-guide). 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'.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.