LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-13-2010, 08:18 AM   #1
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Rep: Reputation: 25
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.

Cheers,

Riganta,
 
Old 02-13-2010, 11:06 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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?
 
Old 02-13-2010, 02:56 PM   #3
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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,

Last edited by riganta; 02-13-2010 at 03:05 PM.
 
Old 02-14-2010, 07:49 AM   #4
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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.

Kind Regards,
 
Old 02-14-2010, 09:03 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 02-14-2010 at 09:16 AM.
 
Old 02-14-2010, 12:23 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
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 :
Code:
/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:
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.
 
Old 02-15-2010, 08:23 AM   #7
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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

Last edited by riganta; 02-15-2010 at 10:31 AM.
 
Old 02-24-2010, 10:38 PM   #8
SendDerek
LQ Newbie
 
Registered: Feb 2010
Location: Scottsdale, AZ
Distribution: Fedora
Posts: 3

Rep: Reputation: 0
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'.
 
Old 03-16-2010, 05:24 PM   #9
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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.
 
Old 03-16-2010, 06:05 PM   #10
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
all my partitions are mounted in /media by default
That is OK.
Quote:
/media is root
No, it's not. You have misunderstood something.
Quote:
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.
 
Old 03-17-2010, 02:49 AM   #11
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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...
 
Old 03-17-2010, 06:35 PM   #12
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Snow Leopard on a Mac without a Mac motherboard LXer Syndicated Linux News 1 01-12-2010 01:28 PM
Installing Ubuntu 9.10 on Windows7 and Snow Leopard rick1231 Linux - Newbie 1 10-19-2009 11:08 PM
Need Help Installing Puppy on VMWare Fusion 2 for Mac OS X Snow Leopard! asilentmurmur Puppy 1 09-30-2009 09:06 PM
Adding a CUPS shared printer on snow leopard Matizek Other *NIX 1 09-30-2009 03:33 AM
Mac/Linux dual-booters: Has anyone installed Snow Leopard yet? vincebs Linux - General 2 09-10-2009 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration