Peter Cordes, 2002-Aug-30 22:16 -0300: > On Fri, Aug 30, 2002 at 02:20:36PM -0700, Jeff wrote: > > > > Does anyone know how I can create an encrypted filesystem on a file in > > my home directory, non-root? I'm using the loop-aes system and I can > > create everything but I have to chown the file and mount point to > > change the owner and group to my user. But, when I mount the > > filesystem the mount point directory is changed back to owner=root and > > group=root and I can't create directories and files in the mounted > > filesystem since I don't have permission. > > Are you aware that when you mount a filesystem on a directory, the > mountpoint is hidden, so not only are files in it not accessable by name, > the ownership and permissions are hidden as well? The new filesystem's root > directory ownership and permissions are what you see when you ls -ld /mnt/foo > (after mounting something on /mnt/foo). > > mke2fs creates the root directory with ownership=0:0, so you need to change > it. If you mount the filesystem and chmod it to what you want it to be, it > will stay that way across mounts and unmounts, just like /usr stays owned by > root. > > If you already knew that, and the problem is something else, then I don't > know how to help.
I didn't know that this was the caseq. After your explanation above I went back and mounted the filesystem and then chown'd it and now it is retaining the proper ownership through umount/mount. I was doing the chown prior to mounting it, so as you explain above I was chown'ing the hidden mountpoint. Thanks alot...jc -- Jeff Coppock Systems Engineer Diggin' Debian Admin and User