proftpd public_html symbolic link not followed.

yonatanp

Verified User
Joined
Aug 25, 2006
Messages
57
Location
Israel
Hello,
I have got a funny situation with my ftp server, I am not yet sure if this is a client side issue or an actual application fault.

when a client logs into his FTP account , normally one would expect a symlink to public_html -> ./domains/example.com/public_html

the symbolic link works fine if i try to access it via ftp from command line, but while trying to access it using FlashFXP ( both ver 3 and 4 ) , and filezilla - the Link is displayed as a regular file, and is not followed.

as this is not an issue for me as an admin who uses the command line, the issue currently affects all windows clients ( hosting clients ) , which try to use symlinks on this server.

I have tried to update proftpd to the latest version today ( ~]# proftpd -v
ProFTPD Version 1.3.4a) , this did not resolve the client side issue.

Quite oddly, on another server of mine which runs ProFTPD 1.3.3c, there is no issue for the windows clients to follow symlinks.


searching the forums lead to this:
http://www.directadmin.com/forum/showthread.php?t=40404&highlight=symlink
which lead to this:
http://www.proftpd.org/docs/howto/Chroot.html

Basically , they explain that a symlink within a chrooted directory must be in a path relative to the chrooted directory.
so make sure NOT to:

ln -s public_html /home/example/domains/example.com/public_html

and YES to:

cd /home/example/

ln -s public_html ./domains/example.com/public_html

I have done that, but still no luck with the client, it sees the symlink not as a "directory" which i can click , but as a regular file(as everything is) which windows cannot understand what to do with.


to better explain what we see as a client , view attached png:

proftpd-ffxp.png

Any advice is more then welcome.
 

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
I'd suggest checking your ProFTPd configuration files on both machines, or with a ProFTPd forum or mailing list; this may be a configurable feature.

Jeff
 

yonatanp

Verified User
Joined
Aug 25, 2006
Messages
57
Location
Israel
I'd suggest checking your ProFTPd configuration files on both machines, or with a ProFTPd forum or mailing list; this may be a configurable feature.

Jeff
Thank you for the advice Jeff, ill vimdiff the files and see if it's something configurable.
mailing list is always the last option for me , so i guess it will take a while until ill get to that ( stubborn ! ) ,

is it possible to compare ./configure options from both of them? i couldn't find which options are used by directadmin. ( where do i look for these )
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,902
Location
GMT +7.00
Check with this:

Code:
# cat /usr/local/directadmin/custombuild/configure/proftpd/configure.proftpd
Code:
# cat /usr/local/directadmin/custombuild/custom/proftpd/configure.proftpd
Code:
# proftpd -V
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,469
Could it be related to this http://www.directadmin.com/forum/showthread.php?t=42332 ? Maybe it became like this in a recent security update from CentOS? We are also seeing this problem with public_html symlink not working for ftp users, we are seing this for some time on both DirectAdmin servers with CentOS 5.x and CentOS 6.x - however the public_html symlink works fine on sftp logins, only regular ftp it does not work.
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,937
Hello,

It wouldn't be related to the Apache changes in custombuild.

It might be related to this:
http://www.directadmin.com/forum/showthread.php?t=42120

Be careful when upgrading to ProFTPd 1.3.4a if you use the DirFakeUser / DirFakeGroup directives at /etc/proftpd.conf as it breaks the MLSD command used by some ftp clients like FileZilla.

Additional details: http://bugs.proftpd.org/show_bug.cgi?id=3715
Try commenting out the sections from your /etc/proftpd.conf:
Code:
        DirFakeUser on ftp
        DirFakeGroup on ftp
John
 

Driesp

Verified User
Joined
Mar 12, 2007
Messages
80
Hello

Since the upgrade to proftpd 1.3.4a symbolic links are not anymore supported/working.
Commenting out DirFakeUser and DirFakeGroup did not fix the problem.

Should I downgrade again?
I did not find the solution as of yet, even not on the proftpd support forum.
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
I use flashfxp and never had any problem like this.

Your ln -s command is wrong.

It should be:

ln -s /path/to/link/from /path/to/link/to
 
Last edited:

Driesp

Verified User
Joined
Mar 12, 2007
Messages
80
Indeed, the TS is using a wrongly formed ln command.

@scsi
What proftpd version are you running?
Have you had the same problem with proftpd?

The public_html symbolic link (which is created by default by DirectAdmin and was working on the previous proftpd release) is now seen as a regular file by ftp clients.

Trying to go to the public_html 'folder/link' triggers the client to execute 'retr public_html' which results in an error.

My best guess would be that symbolic links are disabled by default in this release (1.3.4a).
Is there maybe a configuration in /etc/proftpd.conf which can be changed to fix this issue?
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Its a bug in 1.3.4a.

I was using 1.3.3c and it worked fine.

After upgrading to 1.3.4a it broke.

Stupid proftpd.
 

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
Anyone check yet on any support forums for proftpd? Or reported it as a bug? Does anyone know if it's considered a bug or a feature?

I know it'll keep the public_html link at the user level from working, but are others using other symbolic links in their threads? In other words, is it a big problem or just an annoyance?

Jeff
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,902
Location
GMT +7.00
I've got symlinks working both on 1.3.4a with mod_sftp and ProFTPD Version 1.3.4a without mod_sftp

Checked with EditPlus and FAR.
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
I dont get it. I get the problem with both filezilla and flashfxp. Its either a bug or a feature change. I have no clue.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,902
Location
GMT +7.00
I did have only one report on the issue from a customers of ours, but did not manage to submit it, as it was an issue of a FTP-client which could not deal with SymLinks correctly.
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,937
Hello,

The ftp clients in question use the command MLSD, hence the issue only shows up with them.
Not all ftp clients use this command to get the listing, hence not all are affected.
I'm pretty sure it's a protpd issue, eg:
http://bugs.proftpd.org/show_bug.cgi?id=3715

The release announcement even mentioned there might be issues with MLSD, so as we've noticed, there are.
http://www.directadmin.com/forum/showthread.php?t=42120

There is mention of trying this as a workaround:
Code:
  <IfModule mod_facts.c>
    [url=http://www.proftpd.org/docs/modules/mod_facts.html]FactsAdvertise off[/url]
  </IfModule>
John

John
 

ekaja

Verified User
Joined
Dec 9, 2007
Messages
46
Hello,

The ftp clients in question use the command MLSD, hence the issue only shows up with them.
Not all ftp clients use this command to get the listing, hence not all are affected.
I'm pretty sure it's a protpd issue, eg:
http://bugs.proftpd.org/show_bug.cgi?id=3715

The release announcement even mentioned there might be issues with MLSD, so as we've noticed, there are.
http://www.directadmin.com/forum/showthread.php?t=42120

There is mention of trying this as a workaround:
Code:
  <IfModule mod_facts.c>
    [url=http://www.proftpd.org/docs/modules/mod_facts.html]FactsAdvertise off[/url]
  </IfModule>
John

John

Not fix for me (FreeBSD6.0)
please show full proftpd.conf
thank
 
Last edited:

duke28

Verified User
Joined
Oct 30, 2005
Messages
303
Location
Montreal - Canada
i have the same problem..yesterday..

its give me many problem with many clients..really not funny

i now convert proftpd to pureftp..

no more problem
 

Tootle

Verified User
Joined
Sep 1, 2011
Messages
39
working soultion 4 me:

protftpd.conf in <Global>
ShowSymlinks on
<IfModule mod_facts.c>
FactsOptions UseSlink
</IfModule>
ProFTPD Version 1.3.4b, Centos 5.9
 
Top