I've come across a strange issue.
I've got a zfs partition mounted, in it a solaris "hard partition" zone has been created.
We have noticed that the /home directory
-
root in the global zone cannot access this directry at all
global> id
uid=0(root) gid=0(root)
global> cd home/
home/: Not owner.
global> ls -la |grep home
dr-xr-xr-x 1 root root 1 Jun 16 14:38 home -
root in the client zone can read, but not write to this directory
client1> id
uid=0(root) gid=0(root)
client> cd /home
client> touch foo
touch: foo cannot create
client> cd ..
client> chmod u+w home
chmod: WARNING: can't change home
What is going on here? As far as I can see, there is nothing "special" about this directory
gloabl> cat /etc/zones/client1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN" "file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
DO NOT EDIT THIS FILE. Use zonecfg(1M) instead.
-->
<zone name="knobs1" zonepath="/zones/client1" autoboot="true">
<network address="172.16.54.15" physical="bge0"/>
<network address="172.16.54.21" physical="bge0"/>
<network address="172.16.54.22" physical="bge0"/>
</zone>
gloabl> zfs list | grep client1
zpool1/zones/client1 29.2G 34.7G 14.2G /zones/client1
zpool1/zones/client1@initial 5.89M - 5.89G -
zpool1/zones/client1@pre_profiling 74.4M - 8.58G -
zpool1/zones/client1@post_profiling 8.01G - 19.7G -
zpool1/zones/client1@pre-rebuild 4.42G - 18.4G -
Additional information added, as requested.
# getfacl -a /zones/client1
File system doesn't support aclent_t style ACL's.
See acl(5) for more information on Solaris ACL support.
# zfs get all zpool1/zones/client1
NAME PROPERTY VALUE SOURCE
zpool1/zones/client1 type filesystem -
zpool1/zones/client1 creation Wed Apr 30 18:09 2008 -
zpool1/zones/client1 used 29.2G -
zpool1/zones/client1 available 34.7G -
zpool1/zones/client1 referenced 14.2G -
zpool1/zones/client1 compressratio 1.00x -
zpool1/zones/client1 mounted yes -
zpool1/zones/client1 quota none default
zpool1/zones/client1 reservation none default
zpool1/zones/client1 recordsize 128K default
zpool1/zones/client1 mountpoint /zones/client1 local
zpool1/zones/client1 sharenfs off default
zpool1/zones/client1 checksum on default
zpool1/zones/client1 compression off default
zpool1/zones/client1 atime on default
zpool1/zones/client1 devices on default
zpool1/zones/client1 exec on default
zpool1/zones/client1 setuid on default
zpool1/zones/client1 readonly off default
zpool1/zones/client1 zoned off default
zpool1/zones/client1 snapdir hidden default
zpool1/zones/client1 aclmode groupmask default
zpool1/zones/client1 aclinherit secure default
zpool1/zones/client1 canmount on default
zpool1/zones/client1 shareiscsi off default
zpool1/zones/client1 xattr on default
Best Answer
It could be that you have/need to have /home mounted using automount. Take a look at the /etc/auto_home and /etc/auto_master files (in the zone). Chances are you have it set to automount /home, but haven't configured where to automount from in /etc/auto_home.
Adding something like the following to /etc/auto_home will let you have home dirs automounted from /export/home: