LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-23-2007, 09:28 PM   #1
shakezilla
Member
 
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Rep: Reputation: 16
mount directory ownership


Working right now on getting bsd and slack running on one box, so I want to share my home directory between the two. I want to do this by having a ~60GB ext2 partition and mounting that from each OS.

My home dir in slack is /home/myname, and (before mounting) I've set it to have the following permissions, ownership:
Code:
r-x --- ---  root root
After mounting /dev/hda4 to /home/myname, I need it to have the following permissions so I can use it as my normal user:
Code:
rwx --- ---  myname users(or_whatever)
So how do you go about doing that? Do you have to do something in fstab, or am I just going to have add a line in rc.d?

Here is my fstab (yeah, I'm shameful for not divvying up / ):
Code:
/dev/hda5        swap             swap        defaults         0   0
/dev/hda6        /                ext2        defaults         1   1
/dev/hda4        /home/myname     ext2        defaults         1   2
/dev/hda3        /win             vfat        defaults         1   0
/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
Thanks for your help.
 
Old 01-23-2007, 10:34 PM   #2
nikm
LQ Newbie
 
Registered: Mar 2005
Posts: 24

Rep: Reputation: 15
I think this will create uid and gid problems. Is the uid and gid the same across the platforms?
 
Old 01-23-2007, 10:57 PM   #3
shakezilla
Member
 
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Original Poster
Rep: Reputation: 16
Yes, I'm going to make them consistent. AFAIK, it should just be changing the uids and gids in BSD. In any event, I'm going to hold off on BSD until I get my slack in a stable condition.
 
Old 01-23-2007, 11:39 PM   #4
shakezilla
Member
 
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Original Poster
Rep: Reputation: 16
Well for now I added this to /etc/rc.d/rc.M:
Code:
# mount the home partition
echo "Mounting home partition"
if mount -t ext2 /dev/hda4 /home/myname 2>>/root/homeMountLog
	then chown myname.users /home/myname; chmod 700 /home/myname;
	else date >>/root/homeMountLog; echo >>/root/homeMountLog; echo >>/root/homeMountLog;
fi
Ugly hack but it works. If anyone knows how to get fstab to do it, I'd appreciate it. nikm & everyone, thanks again.
 
  


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
NFS4 mount showing wrong ownership tisource Linux - Networking 1 09-11-2006 01:02 PM
ownership of directory lsu420luv Linux - General 1 06-09-2005 04:36 PM
Changing ownership of vfat mount maamold Linux - Software 2 02-25-2005 02:27 AM
Restoring Home Directory Ownership taylortbb Linux - General 1 08-27-2004 09:40 AM
samba directory ownership problems in domain mode calpha Linux - Networking 0 01-09-2004 07:42 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration