Skip to contentSkip to conversation

invalid stat result

DISCUSSION Guillaume Rousse 2 participants 4 messages Oct 5, 2006 – Feb 7, 2007 Kernel automounter

lore
Share & tools
lore
#2 lore raw

Re: invalid stat result with autofs 5

In reply to Guillaume Rousse
Quoted 1 line · Guillaume Rousse

See http://qa.mandriva.com/show_bug.cgi?id=26244

This seems to be fixed with 5.0.1rc3.

However, it is impossible to create new directories directly under mount point, which is quite problematic for creating new users home directories:
[root@etoile ldapscripts]# mkdir /home/dir/foo
mkdir: cannot create directory `/home/dir/foo': No such file or directory.

From /var/log/messages

Feb  7 11:37:04 etoile automount[25264]: rmdir_path: lstat of foo failed.

From /proc/mounts ou=auto.home.dir,ou=autofs,dc=msr-inria,dc=inria,dc=fr /home/dir autofs rw,fd=5,pgrp=25264,timeout=300,minproto=5,maxproto=5,indirect 0 0 ou=auto.home.mi,ou=autofs,dc=msr-inria,dc=inria,dc=fr /home/mi autofs rw,fd=10,pgrp=25264,timeout=300,minproto=5,maxproto=5,indirect 0 0

no-root-squash NFS option is set, so it is not a write permission problem. Moreover, the problem doesn't exist if /home/dir is manually mounted.

maintainer
#3 lore raw

Re: invalid stat result with autofs 5

Quoted 9 lines · Guillaume Rousse
Quoted 1 line · Guillaume Rousse

See http://qa.mandriva.com/show_bug.cgi?id=26244

This seems to be fixed with 5.0.1rc3.

However, it is impossible to create new directories directly under mount point, which is quite problematic for creating new users home directories:
[root@etoile ldapscripts]# mkdir /home/dir/foo
mkdir: cannot create directory `/home/dir/foo': No such file or directory.

I think we need more infomation here.

What is the kernel version and have any additional patches been added? What is the version of autofs and have any patches been added?

I don't quite understand the problem description either.

What are the maps that are being used?
Is the browse (--ghost) option being used?
If we get a clear description of the problem then we may need a debug log, but right now I wouldn't know what to look for.

It isn't possible to create directories in an autofs filesystem itself, and never has been, as that is the responsibility of the user space daemon. Due to changes in recent kernels and the fact that I got criticized for autofs creating directories as root on NFS mounted file systems the mount point directories that you wish to mount must already exist on the remote server. autofs creating these directories is considered a security risk.

If you wished to create directories on a remote server then the parent directory must be mounted, one way or another, then given that you have permission, you could create the directories.

Quoted 17 lines
Quoted 1 line

From /var/log/messages

Feb  7 11:37:04 etoile automount[25264]: rmdir_path: lstat of foo failed.
Quoted 1 line

From /proc/mounts

ou=auto.home.dir,ou=autofs,dc=msr-inria,dc=inria,dc=fr /home/dir autofs rw,fd=5,pgrp=25264,timeout=300,minproto=5,maxproto=5,indirect 0 0 ou=auto.home.mi,ou=autofs,dc=msr-inria,dc=inria,dc=fr /home/mi autofs rw,fd=10,pgrp=25264,timeout=300,minproto=5,maxproto=5,indirect 0 0

no-root-squash NFS option is set, so it is not a write permission problem. Moreover, the problem doesn't exist if /home/dir is manually mounted.

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