Jeff Dike schreef:
> On Fri, Aug 17, 2007 at 03:24:59PM +0200, Benedict Verheyen wrote:
>> I first thought of using hostfs and leaving /home on the host machine.
>> This for instance resulted in saving emails from a user with root rights.
>> Anyway, to solve this, i thought of making file to share between the
>> umls and putting all data from /home in there.
>
> hostfs should work in this case. If you have a UML running as user,
> importing the host's /home/user, the permissions should be OK.
>
> The one odd thing, which shouldn't hurt, is that if the user inside
> UML is root, and saves files, they will be owned by user, not root.
>
>> I found out about ocfs2 and it seems this would allow just that.
>> I've set up etc/ocfs2/cluster.conf/, with the host and 2 guests as node.
>> The host too because i want /home to be in the file (home_fs) and not
>> anywhere else.
>
> ocfs2 should work, but setting up a cluster is overkill for what you
> want.
I tried starting the uml as my user.
This is part of my uml startup script:
# Creating tap device
$UMLUSER is set to "benedict"
d_create_device() {
# create tun device if it doesn't exist yet + give appropriate rights
if [ ! -d /dev/net ]
then
# create the directory
mkdir -p /dev/net
echo " /dev/net created"
#else
# echo " /dev/tun exists"
fi
if [ ! -e /dev/net/tun ]
then
# create the node
mknod -m 660 /dev/net/tun c 10 200
chown root:uml /dev/net/tun
chmod 660 /dev/net/tun
echo "/dev/net/tun created"
# insert rules voor udev
if [ ! -f /etc/udev/rules.d/011-udev.rules ]
then
echo "udevrules created"
touch /etc/udev/rules.d/011-udev.rules
cat 'KERNEL="tun", NAME="net/%k", GROUP="uml", MODE="0660"' >>
/etc/udev/rules.d/011-udev.rules
#else
# echo " udevrules exists"
fi
else
#echo " /dev/net/tun exists"
chown root:uml /dev/net/tun
fi
# create tap device if we aren't doing bridging
if [ $BRIDGING -eq 0 ]
then
echo "Creating $TAP"
tunctl -u $UMLUSER -t $TAP
ifconfig $TAP $IP_TAP up
route add -host $IP_VM dev $TAP
bash -c 'echo 1 > /proc/sys/net/ipv4/conf/'$TAP'/proxy_arp'
arp -Ds $IP_VM $INT pub
fi
}
The tun device is owned by root though. Does this also have to be my user?
The UML startup line:
screen -S loki -d -m /storage1/vm/vmlinux_2.6.22.2 mem=64M devfs=nomount rw
ubd0=/storage1/vm/root_fs_loki ubd1=/storage1/vm/swap_fs_loki eth0=tuntap,tap1
umid=loki con=null con0=fd:0,fd:1
When getmail then gets mail (what's in a name :)), the mail is saved in my
Maildir but still as root:root.
My UML's fstab
...
none /home hostfs defaults,/home 0 0
What am i doing wrong?
Thanks,
Regards,
Benedict
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user