View previous topic :: View next topic |
Author |
Message |
sege n00b
Joined: 22 Nov 2005 Posts: 31
|
Posted: Sun Mar 16, 2008 12:27 pm Post subject: vsftpd not showing directories with sshfs mounts |
|
|
Hey there,
I just set up a vsftpd on my server using virtual users.
I figured out that the standard ftp root is /home/ftp. I can upload and download to there via gftp.
Now if I ssh to this server (as root on the server), create a new directory in /home/ftp, chown this new directory to ftp:ftp and after that mount a directory from a different server via sshfs to this new directory, the directory disappears in the listing of gftp.
If I try to access it manually by typing in the name, I get
550 Failed to change directory.
Can somebody help me with this ? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Sun Mar 16, 2008 3:48 pm Post subject: |
|
|
What is the output of ls -la /home/ftp/? |
|
Back to top |
|
|
sege n00b
Joined: 22 Nov 2005 Posts: 31
|
Posted: Mon Mar 17, 2008 11:59 am Post subject: |
|
|
Code: | fuckup ftp # ls -la
total 16
drwxr-xr-x 4 ftp ftp 4096 Mar 16 13:13 .
drwxr-xr-x 3 root root 4096 Mar 16 12:59 ..
drwx------ 2 ftp ftp 4096 Mar 16 13:13 Hallo
-rw-r--r-- 1 root root 0 Mar 16 13:02 asdf
drwxr-xr-x 1 ftp ftp 4096 Mar 16 17:11 hacktor
fuckup ftp # umount hacktor/
fuckup ftp # ls -la
total 16
drwxr-xr-x 4 ftp ftp 4096 Mar 16 13:13 .
drwxr-xr-x 3 root root 4096 Mar 16 12:59 ..
drwx------ 2 ftp ftp 4096 Mar 16 13:13 Hallo
-rw-r--r-- 1 root root 0 Mar 16 13:02 asdf
drwxr-xr-x 2 root root 4096 Mar 16 13:16 hacktor
fuckup ftp #
|
first one is with sshfs mounted to hacktor
second is unmounted sshfs |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Tue Mar 18, 2008 3:18 am Post subject: |
|
|
Perhaps vsftpd is reacting badly to the directory being owned by root. If you chown the directory to ftp:ftp after the sshfs is mounted, does the ftp client work correctly? |
|
Back to top |
|
|
sege n00b
Joined: 22 Nov 2005 Posts: 31
|
Posted: Fri Mar 21, 2008 12:39 pm Post subject: |
|
|
I dont think thats the problem.
I think you read the log above the wrong way.
With sshfs mounted to hacktor, the directory is owned by ftp:ftp
This is the time, when it doesnt show up.
After unmounting its owned by root and DOES show up.
I dont know what wrong. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23091
|
Posted: Fri Mar 21, 2008 11:33 pm Post subject: |
|
|
That is exactly what I understood it to say. My point was that vsftpd may be examining the ownership of the directory and making a decision based on that ownership. Please try as I asked and chown the mounted sshfs to root:root before starting the ftp client.
Another possibility, which may be more likely, is that vsftpd is reacting to the presence of a mount point. If you mount a traditional hierarchy, such as a CD, at that location, what happens? |
|
Back to top |
|
|
sege n00b
Joined: 22 Nov 2005 Posts: 31
|
Posted: Sat Mar 22, 2008 5:31 pm Post subject: |
|
|
Okay, now I understand.
I tried chowning the directory to root:root .
But that doesnt help. It doesnt show up. Like before.
Know I made a new directory and mounted my boot partition there.
I can access this directory without problems via ftp.
Thats weird ! |
|
Back to top |
|
|
|