LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2013, 06:38 AM   #1
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Rep: Reputation: Disabled
Post Ignore permission when copy from a hfs+ drive on CentOS


Hi, there:

I've been messing around with CentOS for a couple of weeks now, and I'm loving it, but I'm still clueless on some aspects. One of them is how to properly manage data around. It happens that I need to service hfs+ drives, and I was expecting that this wouldn't be an issue. After a google search I found ksmod-hfsplus and installed it. Now I can read those hfs+ drives, but I can'r write them. Then I wanted to copy some files to the CentOS server for backing up, so I can access them from anywhere with an nfs share.

The problem came there. Some of the files on the drive can't be read because of permissions, and since I can't write on the drive I can't change them. What can I do to make linux ignore permissions and just copy them?

Also, I can't get the nfs accessible from the mac. If I invoke showmount -A 192.168.1.2 from the mac CLI I can see the nfs share, but when I try to mount it, I can't. I read some tutorials, and I can make the share on the server (still some confusion on the permits I shuld give to it) but I simply can't get the share to mount on the client. What would be a nice checklist for debugging this sort of issues?

Thaks, people!

j;e
 
Old 10-19-2013, 11:12 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
getting the Mac to access to NFS share you need to put insecure in your exports file and you need to set your NFS server to run on static ports.

i use the following script on my OSx boxes to mount my NFS share on my CentOS 6.x server:

Code:
imac:~ user$ cat NFS 
#!/bin/bash
#[! -d "/Users/user/Desktop/LVM/" ] && mkdir /Users/user/Desktop/LVM/
mount -t nfs jackknife:/exports/ /Users/user/Desktop/LVM/
here is my exports on my server:

Code:
[user@centos ~]$ cat /etc/exports 
#
#	/etc/exports

#	NFS4
/exports *(rw,insecure,subtree_check,crossmnt,fsid=0)

#	NFSv3
/exports/centos/public *(rw,insecure,no_subtree_check,fsid=3010)
/exports/NFS_TV_Shows *(rw,insecure,no_subtree_check,fsid=3020)
note the bolded section under my NFSv3 export. OSx is not capable of connecting to NFSv4 as far as I can tell.

as for the permissions, thats just a nasty issue with Apple locking down their modified BSD file system. Your best option might be to put the Apple drive back into the Apple computer and transfer the files via scp, rsync, or once you get your NFS working via the GUI with click n drag.

Last edited by lleb; 10-19-2013 at 11:14 AM.
 
1 members found this post helpful.
Old 10-19-2013, 12:02 PM   #3
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks! That's been very helpful

As a matter of fact, connecting the drive to the Mac and then moving the files to the nfs share over ethernet was what I wanted to achieve once I started to find problems reading the drive directly via USB. I'll be servicing mac computers a lot, so I really appreciate the tip on using nfsv3 and the helpful script. Cheers!

je
 
Old 10-19-2013, 07:32 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
hope it all helps.

for what ever reason the centos support for afs+ is very very sketchy. last time i tried to mount and copy files like you were doing i ended up with a kernel crash. thankfully it nothing to my centos box, but still had to remove the drive and move the data via LAN instead of internally as i had wished.
 
Old 10-20-2013, 08:16 AM   #5
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Original Poster
Rep: Reputation: Disabled
It helped, a lot, thanks! I'm moving now the files to the nfs over LAN. It is tedious, as I've got close to 2TB of data, and even it's a gigalan connection, it's taking its time. I've got one question, though: why is CentOS using the 502 GUID for the files I'm transferring? It's not a big deal, since I can read them from the Mac, but I'm curious. Also: how can I secure this nfs? When I share a folder on OS X Server, I can tell who can and who can't connect to that server using user accounts. How can I achieve something similar here? Once that files are tidied up, I want to share them with some users on the WAN so I'll need some level of security. In the end, I'm just building a lab for learning, and I want to simulate the environment that I could find in a real life SMB. Thanks for your help.
 
Old 10-20-2013, 09:55 AM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
that is coming from your OSx. I would venture to bet the GUID of your user on the Mac is 502. mine was 501, i went in and change both my CentOS user and my OSx user to GUID 1000.

the securing of the NFSv3 is done via GUID/UID in the exports. you can add specific UID/GID to your exports. i THINK the link below will have some info to guide you towards it.

http://www.vanemery.com/Linux/NFS-Van.html
 
1 members found this post helpful.
Old 10-20-2013, 11:00 AM   #7
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks for the link, mate As soon as I end moving the files around (and making a second copy, just in case) I'll start securing the share. I think I'll make a "share" group and then make an account for every user. I don't know yet if I'll be using local accounts on the server or I'll be configuring the LDAP service. Probably the second, as it is closer to a real life scenario.

Yep, you're right 502 is the UID on my Mac. Last time I reinstalled OS X I've set up a "ladmin" account before my usual account, and I completely forgot about it. That and the "games" group on CentOS completely confused me. You've been very kind, thanks for your help!

je
 
Old 10-20-2013, 02:39 PM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
no worries. i went through a lot of what you are facing now about a year and a half ago. it is not easy to find a lot of that info.
 
Old 10-20-2013, 03:59 PM   #9
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Original Poster
Rep: Reputation: Disabled
I think you're right. The problem I've found with linux is that there's info everywhere, but it's scattered, so you've got to read from a lot of sources to find the solution you need. In one side that's great because you learn things along your way to solve your problem, but on the other side, it makes for a slow and disperse learning path. It's like when you start to grasp on a concept you've got to move to another, and you end up a little confused because you don't really know what would be the milestones you should be achieving first in order to follow a logic learning path. I suppose that in a year and a half I'll be a lot less confused and a lot more "enlightened". Cheers!

je
 
Old 10-22-2013, 03:00 PM   #10
DrTek
LQ Newbie
 
Registered: Oct 2013
Location: Barcelona
Distribution: CentOS 6.4, ElementaryOS Luna, Ubuntu, Ubuntu Server, and other Linux flavors.
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hey, I just wanted to comment you that Apple is defaulting to SMB2 for Mavericks, instead of AFP. Also, that it can connect to NFSv3 and v4. Take a look at the pdf. Cheers!

http://images.apple.com/media/us/osx...y_Overview.pdf

je
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to mount hfs drive? CheckUl8r Linux - Newbie 3 02-01-2012 03:35 AM
Convert DVD image from HFS+ to Hybrid HFS/ISO Dark_Elf Linux - Software 0 10-24-2007 01:42 PM
Error mounting HFS+ volume: unable to find HFS+ superblock applewax Linux - General 3 05-31-2006 09:45 AM
Locked folders on an HFS drive frankc98376 Fedora 0 08-16-2005 01:35 PM
copy direcotry but ignore some files gsbarry Linux - General 3 02-22-2003 07:15 AM


All times are GMT -5. The time now is 12:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration