Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vsftpd not showing directories with sshfs mounts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
sege
n00b
n00b


Joined: 22 Nov 2005
Posts: 31

PostPosted: Sun Mar 16, 2008 12:27 pm    Post subject: vsftpd not showing directories with sshfs mounts Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Sun Mar 16, 2008 3:48 pm    Post subject: Reply with quote

What is the output of ls -la /home/ftp/?
Back to top
View user's profile Send private message
sege
n00b
n00b


Joined: 22 Nov 2005
Posts: 31

PostPosted: Mon Mar 17, 2008 11:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Tue Mar 18, 2008 3:18 am    Post subject: Reply with quote

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
View user's profile Send private message
sege
n00b
n00b


Joined: 22 Nov 2005
Posts: 31

PostPosted: Fri Mar 21, 2008 12:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Fri Mar 21, 2008 11:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
sege
n00b
n00b


Joined: 22 Nov 2005
Posts: 31

PostPosted: Sat Mar 22, 2008 5:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum