On Thu, 4 May 2006, Moshe Kaminsky wrote:

> * Ian Kent <[EMAIL PROTECTED]> [03/05/06 20:45]:
> > On Wed, 3 May 2006, Moshe Kaminsky wrote:
> > 
> > > * Ian Kent <[EMAIL PROTECTED]> [03/05/06 18:00]:
> > > > On Wed, 3 May 2006, Moshe Kaminsky wrote:
> > > > > Another question I have: I once asked if it's possible to run the 
> > > > > actual mount command as the user trying to read the directory, 
> > > > > instead of root. I was told that this is impossible in version 4. 
> > > > > Will it be possible now?
> > > > 
> > > > Do you have a mount that will work for a user?
> > > > 
> > > > You can use the $USER substitution variable now to mount with a 
> > > > "user=${USER}" option or $UID and $GID with "uid=${UID}" and 
> > > > "gid=${GID}" 
> > > > in your map. Will that help?
> > > > 
> > > 
> > > I don't think so. What I have in mind is that a user will be able to 
> > > automount his home directory on a remote machine using sshfs. For this, 
> > > that user has to actually run the mount command, so that his ~/.ssh is 
> > > used.
> > 
> > The problem here is that mount(8) will only allow the "user" option if 
> > an entry is present in the fstab which defeats the purpose of using 
> > autofs.
> 
> Funny. It appears that you're right. I'm sure it used to work, though 
> (maybe something changed in the kernel?)

All this checking is done in mount(8). I've investigated this before when 
checking this type of question. Maybe yours.

Anyway, after thinking about this and checking out sshfs this is not a 
problem. Getting the sshfs mount done as the user (now we know the 
username) would be possible by writting a simple mount_sshfs.c module but 
it looks like the resulting mount can't be un-mounted by umount. Is that 
right?

Ian

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to