How can I hide shares from FTP

SSH in and

nano /etc/passwd

Find the user you added (In my case “bill”) and edit his dir from /shares to /shares/Transfer

example

bill:x:1000:1000:,2,,:/shares/Transfer:/bin/sh

Hit control o

then hit enter

then control x

This will save your edited passwd file and close nano

In terminal or putty, restart vsftp

MBL3TB:~# /etc/init.d/vsftpd restartStopping FTP server: vsftpd.Starting FTP server: vsftpd.

I have jailed this user to only have access to the Transfer share via FTP

Here is some sample output before editing user “bill”

login as: root
root@192.168.1.4's password:
Linux MBL3TB 2.6.32.11-svn52288 #1 Wed Oct 26 18:57:59 PDT 2011 ppc

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Disclaimer: SSH provides access to the network device and all its
content, only users with advanced computer networking and Linux experience
should enable it. Failure to understand the Linux command line interface
can result in rendering your network device inoperable, as well as allowing
unauthorized users access to your network. If you enable SSH, do not share
the root password with anyone you do not want to have direct access to all
the content on your network device.

MBL3TB:~# nano /etc/passwd
  GNU nano 2.0.7 File: /etc/passwd

libuuid:x:100:101::/var/lib/libuuid:/bin/sh
sshd:x:101:65534::/var/run/sshd:/usr/sbin/nologin
ntp:x:102:104::/home/ntp:/bin/false
mysql:x:104:108:MySQL Server,,,:/var/lib/mysql:/bin/false
statd:x:105:65534::/var/lib/nfs:/bin/false
avahi-autoipd:x:106:109:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
messagebus:x:103:106::/var/run/dbus:/bin/false
avahi:x:107:110:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
ftp:x:108:1001:ftp daemon,,,:/srv/ftp:/bin/false
Debian-exim:x:109:104:Debian exim,,,:/nonexistent:/bin/false
daapd:x:501:1000:forked daap daemon,,,:/shares:/bin/sh
guest:x:500:1000::/shares:/bin/sh
admin:x:999:1000:System Administrator,1,,:/shares:/bin/sh

bill:x:1000:1000:,2,,:/shares/:/bin/sh





^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur **bleep**
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
4 Likes