Some files/directories are not listed by ProFTPD server

2

1

I just inherited a WordPress site that a client had half-developed by another web developer.

The site is hosted on a Strato dedicated server and has got a Plesk installed on it.

I just made an FTP user to get an FTP access to the site. Up till here, everything is fine and correct.

The problem is that not all directories and files are shown in the FTP (FileZilla). I know that there are more files, because I can see them in the web file manager.

I thought it was a permissions problem, but I have checked all the permissions and they are all correct.

I have tried on FileZilla and Cyberduck.

Other test made: On FileZilla, showing the hidden files -> didn't work.

The permissions for the files I can not see are: rwx r-x r-x (755)

After enabling logging of raw FTP directory listing, I get:

Estado:         Recuperando el listado del directorio...
Comando:    CWD /httpdocs/wp-content/plugins
Respuesta:  250 CWD command successful
Comando:    PASV
Respuesta:  227 Entering Passive Mode (85,214,95,20,221,71).
Comando:    MLSD
Respuesta:  150 Opening BINARY mode data connection for MLSD
Listado:    modify=20150119092306;perm=flcdmpe;type=cdir;unique=803U38C0309;UNIX.group=503;UNIX.mode=0755;UNIX.owner=10000; .
Listado:        modify=20141027105142;perm=adfrw;size=2255;type=file;unique=803U38C0320;UNIX.group=503;UNIX.mode=0644;UNIX.owner=10000; hello.php
Listado:        modify=20141027105142;perm=adfrw;size=28;type=file;unique=803U38C0321;UNIX.group=503;UNIX.mode=0644;UNIX.owner=10000; index.php
Listado:        modify=20150113112029;perm=adfrw;size=1458315;type=file;unique=803U38C0849;UNIX.group=503;UNIX.mode=0644;UNIX.owner=10000; revslider.zip
Listado:        modify=20141211171023;perm=flcdmpe;type=pdir;unique=803U38C022A;UNIX.group=503;UNIX.mode=0755;UNIX.owner=10000; ..
Respuesta:  226 Transfer complete
Estado:         Directorio listado correctamente

FTP view:

TP view

File manager view:

File manager view

Just logged in through SSH and with the exact same user and password as with FTP and can see all archives!

In FileZilla, after Welcome Message I get:

Respuesta:  220 ProFTPD 1.3.5 Server (ProFTPD)
...
Comando:    SYST
Respuesta:  215 UNIX Type: L8

More tests: I can see new subfolders if I create them through FTP. There are other subfolders and files that I know they must be there (all along the WordPress tree folder) but I do not see them. Not only in the folder shown in the images.

Any ideas what the problem could be?

anexo

Posted 2015-01-21T15:47:57.290

Reputation: 123

Only thing that makes sense is permissions, within web manager what are the permission flags for the files you can't see? – Samuel Nicholson – 2015-01-21T15:54:28.350

Are you sure you are viewing the same directory in Plesk and FTP? Can you include raw FTP directory listing (in FileZilla go to Edit > Settings > Debug > Show raw directory listing) and screenshot from the Plesk? What FTP server are you using? – Martin Prikryl – 2015-01-21T15:57:38.247

The permissions for the files i can not se are: rwx r-x r-x (755)

After adding FTP directory listing, i get: modify=20150119092306;perm=flcdmpe;type=cdir;unique=803U38C0309;UNIX.group=503;UNIX.mode=0755;UNIX.owner=10000; .

I can not post image till i have 10 of reputation – anexo – 2015-01-21T16:04:49.777

1I've meant complete listing of the directory contents (include it into the question, not into comments). You can post a link to the image (hosted elsewhere) at least. Do not forget about the FTP server information. – Martin Prikryl – 2015-01-21T16:20:52.053

Thanks for sharing the log and screenshots. What about the FTP software? If you cannot tell yourself, share the FTP welcome message (server response after "Connection established, waiting for welcome message...") and/or a response of SYST command (in FileZilla menu go to Server > Enter custom command). – Martin Prikryl – 2015-01-22T07:56:50.063

So you miss only subfolders, in the listing, right? But you see all subfolders in other folders, right? If you create new subfolder in FileZilla, do you see it (even after reconnect)? – Martin Prikryl – 2015-01-22T07:58:49.037

Same problem for me on Debian 8 "Jessie", with ProFTPd. With or without TLS and any FTP client. Permissions on server look identical for everything. If connecting with a user not jailed into the FTP dir, I see all files. If jailed into the dir (DefaultRoot ~), some subdirs are missing. – mivk – 2015-08-06T16:55:03.587

Answers

1

With ProFTPD server there are many configuration directives that can cause the server to hide certain directories from a client, including:

  • HideFiles – Enable hiding of files based on regular expressions
  • HideUser – Enable hiding of files based on user owner
  • HideNoAccess – Block the listing of directory entries to which the user has no access permissions
  • DenyAll – Deny all clients
  • DenyUser – User based deny rules
  • DenyGroup – Group based deny rules
  • DenyClass – Class based deny rules
  • Deny – Access control directive

You should be able to see in ProFTPD log file why the server hides the files.

Check /etc/proftpd/proftpd.conf and other ProFTPD configuration files, including virtual host-specific configuration files. Look also for any .ftpaccess in the directory and parent directories.

Martin Prikryl

Posted 2015-01-21T15:47:57.290

Reputation: 13 764

Will try and let you know! Thank you very much for your help!! – anexo – 2015-01-22T11:29:49.957

0

If using a chroot jail (DefaultRoot ~), check that the FTP user's home directory is indeed the directory it should be.

And if the directory is a mount point or under a mount point, check that the right disk is indeed mounted there.

mivk

Posted 2015-01-21T15:47:57.290

Reputation: 2 270