Autor Tópico: (Resolvido) Servidor FTP - VSFTPD  (Lida 3245 vezes)

Offline dinis_87

  • Usuário Ubuntu
  • *
  • Mensagens: 45
    • Ver perfil
(Resolvido) Servidor FTP - VSFTPD
« Online: 29 de Junho de 2009, 19:26 »
Olá, na tentativa de instalar um servidor ftp, instalei o servidor VSFTPD.
Instalei tambem o "plugin" para poder configurar no webmin, no entanto permite o conjunto reduzido de configurações.
Tentei a configuração através do terminal mas ao aceder ao ficheiro /ect/vsftpd.conf a resposta foi permissão negada, tentei inclusive com permissoes de root, e continuou a dar permissão negada.
Gostaria que alguem me ajudasse a resolver este problema visto que não consigo acerder ás configurações do servidor ftp.
Obrigado
« Última modificação: 17 de Julho de 2009, 19:21 por dinis_87 »

Offline slkslk

  • Usuário Ubuntu
  • *
  • Mensagens: 344
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #1 Online: 30 de Junho de 2009, 09:05 »
eu utilizo o proftpd e funciona bem. Quanto ao seu problema, estranho não conseguir editar o ficheiro. Já experimentou parar o serviço antes de editar o ficheiro, por ex.

/etc/init.d/vsftpd stop (não tenho a certeza se este é o nome do serviço)

Caso não dê faça

ls -la

na directoria onde tem o vsftpd.conf instalado e poste o resultado.


Cumps
“Carpe diem, quam minimum credula postero.”
(Aproveite o dia, acredite o mínimo possível no amanhã), Horácio, Odes I,11,8

Offline dinis_87

  • Usuário Ubuntu
  • *
  • Mensagens: 45
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #2 Online: 02 de Julho de 2009, 18:30 »
Caro Filipe (SLKSLK) realmente mesmo parando o serviço não foi possivel editar o ficheiro.
Envio o resultado do ls -la na directoria do ficheiro.
----------------------------------------------------------------------------------
total 1396
drwxr-xr-x 125 root root    12288 2009-07-02 16:02 .
drwxr-xr-x  21 root root     4096 2009-06-30 19:33 ..
drwxr-xr-x   8 root root     4096 2009-06-30 19:34 acpi
-rw-r--r--   1 root root     2986 2009-04-20 14:59 adduser.conf
-rw-r--r--   1 root root       44 2009-07-02 15:56 adjtime
drwxr-xr-x   3 root root     4096 2009-04-20 15:02 alsa
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 alternatives
-rw-r--r--   1 root root      395 2008-09-03 00:37 anacrontab
drwxr-xr-x   7 root root     4096 2009-04-20 15:06 apm
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 apparmor
drwxr-xr-x   6 root root     4096 2009-06-30 19:35 apparmor.d
drwxr-xr-x   3 root root     4096 2009-06-30 19:35 apport
drwxr-xr-x   4 root root     4096 2009-06-30 20:24 apt
-rw-r-----   1 root daemon    144 2009-04-17 08:53 at.deny
drwxr-xr-x   3 root root     4096 2009-04-20 15:09 avahi
-rw-r--r--   1 root root     1733 2009-03-02 14:22 bash.bashrc
-rw-r--r--   1 root root   226839 2009-02-05 08:02 bash_completion
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 bash_completion.d
-rw-r--r--   1 root root      332 2009-04-09 07:12 bindresvport.blacklist
-rw-r--r--   1 root root      309 2009-07-02 13:16 blkid.tab
-rw-r--r--   1 root root      309 2009-07-02 13:11 blkid.tab.old
drwxr-xr-x   2 root root     4096 2009-06-30 19:33 bluetooth
-rw-r--r--   1 root root     6924 2008-06-19 04:52 bogofilter.cf
drwxr-xr-x   2 root root     4096 2009-04-20 15:04 bonobo-activation
-rw-r--r--   1 root root       33 2009-04-20 15:09 brlapi.key
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 brltty
-rw-r--r--   1 root root    18381 2009-03-18 03:20 brltty.conf
drwxr-xr-x   3 root root     4096 2009-04-20 14:59 ca-certificates
-rw-r--r--   1 root root     6282 2009-04-20 14:59 ca-certificates.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 calendar
drwxr-s---   2 root dip      4096 2009-04-20 15:06 chatscripts
drwxr-xr-x   2 root root     4096 2009-06-30 19:36 checkbox.d
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 compizconfig
drwxr-xr-x   4 root root     4096 2009-04-20 15:01 ConsoleKit
drwxr-xr-x   2 root root     4096 2009-06-30 19:11 console-setup
drwxr-xr-x   3 root root     4096 2009-04-20 15:04 console-tools
drwxr-xr-x   2 root root     4096 2009-06-30 19:33 cron.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 cron.daily
drwxr-xr-x   2 root root     4096 2009-06-30 19:33 cron.hourly
drwxr-xr-x   2 root root     4096 2009-06-30 19:33 cron.monthly
-rw-r--r--   1 root root      724 2008-11-12 15:47 crontab
drwxr-xr-x   2 root root     4096 2009-06-30 19:33 cron.weekly
drwxr-xr-x   4 root lp       4096 2009-06-30 19:35 cups
drwxr-xr-x   5 root root     4096 2009-04-20 15:09 dbus-1
-rw-r--r--   1 root root     2969 2009-03-24 05:30 debconf.conf
-rw-r--r--   1 root root        4 2008-12-04 09:01 debian_version
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 default
drwxr-xr-x   4 root root     4096 2009-04-20 15:05 defoma
-rw-r--r--   1 root root      600 2009-03-27 22:43 deluser.conf
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 depmod.d
drwxr-xr-x   4 root root     4096 2009-04-20 15:00 dhcp3
drwxr-xr-x   2 root root     4096 2009-06-30 19:13 dictionaries-common
drwxr-xr-x   2 root root     4096 2009-04-03 09:25 dm
drwxr-xr-x   3 root root     4096 2009-04-20 15:03 doc-base
drwxr-xr-x   3 root root     4096 2009-04-20 14:59 dpkg
-rw-r--r--   1 root root       34 2008-02-19 04:33 e2fsck.conf
drwxr-xr-x   3 root root     4096 2009-04-20 15:01 emacs
-rw-r--r--   1 root root       79 2009-04-20 14:59 environment
drwxr-xr-x   2 root root     4096 2009-04-20 15:04 esound
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 event.d
drwxr-xr-x   4 root root     4096 2009-04-20 15:03 firefox-3.0
drwxr-xr-x   4 root root     4096 2009-04-20 15:02 fonts
drwxr-xr-x   3 root root     4096 2009-04-20 15:04 foomatic
-rw-r--r--   1 root root      524 2009-06-30 21:50 fstab
-rw-r--r--   1 root root      828 2009-06-30 21:50 fstab.pre-ntfs-config
-rw-r--r--   1 root root      132 2008-09-22 17:26 ftpusers
-rw-r-----   1 root fuse      216 2009-03-05 17:42 fuse.conf
-rw-r--r--   1 root root     2689 2008-03-26 17:44 gai.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 gamin
drwxr-xr-x   7 root root     4096 2009-04-20 15:01 gconf
drwxr-xr-x   7 root root     4096 2009-06-30 21:55 gdm
drwxr-xr-x   3 root root     4096 2009-04-20 15:03 gimp
drwxr-xr-x   3 root root     4096 2009-04-20 15:05 gnome
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 gnome-app-install
drwxr-xr-x   3 root root     4096 2009-04-20 15:03 gnome-system-tools
drwxr-xr-x   3 root root     4096 2009-04-20 15:01 gnome-vfs-2.0
-rw-r--r--   1 root root    10852 2007-04-28 03:27 gnome-vfs-mime-magic
drwxr-xr-x   2 root root     4096 2009-06-30 19:36 gre.d
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 groff
-rw-r--r--   1 root root      878 2009-06-30 19:08 group
-rw-------   1 root root      867 2009-06-30 19:08 group-
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 grub.d
-rw-r-----   1 root shadow    736 2009-06-30 19:08 gshadow
-rw-------   1 root root      725 2009-06-30 19:08 gshadow-
drwxr-xr-x   2 root root     4096 2009-04-20 15:02 gtk-2.0
drwxr-xr-x   3 root root     4096 2009-04-20 15:03 hal
-rw-r--r--   1 root root     4793 2009-01-09 12:24 hdparm.conf
-rw-r--r--   1 root root      418 2009-04-20 15:07 hesiod.conf
-rw-r--r--   1 root root       92 2008-12-23 18:53 host.conf
-rw-r--r--   1 root root       12 2009-06-30 19:09 hostname
-rw-r--r--   1 root root      257 2009-06-30 19:09 hosts
-rw-r--r--   1 root root      579 2009-04-20 15:07 hosts.allow
-rw-r--r--   1 root root      878 2009-04-20 15:07 hosts.deny
drwxr-xr-x   2 root root     4096 2009-04-20 15:05 hp
drwxr-xr-x   3 root root     4096 2009-04-20 15:04 ifplugd
-rw-r--r--   1 root root      136 2009-06-30 20:30 inetd.conf
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 init.d
drwxr-xr-x   5 root root     4096 2009-04-20 15:00 initramfs-tools
-rw-r--r--   1 root root     1723 2009-03-06 19:34 inputrc
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 iproute2
-rw-r--r--   1 root root       19 2009-04-13 10:33 issue
-rw-r--r--   1 root root       12 2009-04-13 10:33 issue.net
drwxr-xr-x   3 root root     4096 2009-04-20 15:04 kbd
drwxr-xr-x   5 root root     4096 2009-04-20 15:04 kernel
-rw-r--r--   1 root root      167 2009-06-30 19:12 kernel-img.conf
drwxr-xr-x  10 root root     4096 2009-04-20 15:06 laptop-mode
drwxr-xr-x   2 root root     4096 2009-04-20 15:00 ldap
-rw-r--r--   1 root root    50861 2009-06-30 20:30 ld.so.cache
-rw-r--r--   1 root root       34 2009-04-20 14:59 ld.so.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:04 ld.so.conf.d
-rw-r--r--   1 root root     3587 2009-02-14 01:22 lftp.conf
drwxr-xr-x   2 root root     4096 2008-06-19 13:59 libpaper.d
-rw-r--r--   1 root root     2570 2009-02-13 11:28 locale.alias
-rw-r--r--   1 root root     3439 2009-06-30 19:29 localtime
drwxr-xr-x   5 root root     4096 2009-04-20 15:02 logcheck
-rw-r--r--   1 root root    10881 2009-06-30 19:24 login.defs
-rw-r--r--   1 root root      599 2009-01-26 18:55 logrotate.conf
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 logrotate.d
drwxr-xr-x   2 root root     4096 2009-03-02 10:16 lsb-base
-rw-r--r--   1 root root     3820 2009-02-07 23:33 lsb-base-logging.sh
-rw-r--r--   1 root root       97 2009-04-13 10:25 lsb-release
-rw-r--r--   1 root root    15752 2008-12-10 17:43 ltrace.conf
-rw-r--r--   1 root root      111 2009-03-16 17:32 magic
-rw-r--r--   1 root root      111 2009-03-16 17:32 magic.mime
-rw-r--r--   1 root root    19884 2009-06-30 19:36 mailcap
-rw-r--r--   1 root root      449 2008-06-19 13:50 mailcap.order
-rw-r--r--   1 root root     5170 2009-03-19 10:17 manpath.config
-rw-r--r--   1 root root    21373 2008-06-19 13:50 mime.types
-rw-r--r--   1 root root      803 2009-02-12 15:37 mke2fs.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 modprobe.d
-rw-r--r--   1 root root      198 2009-06-30 19:11 modules
drwxr-xr-x   4 root root     4096 2009-04-20 15:07 mono
lrwxrwxrwx   1 root root       13 2009-06-30 18:53 motd -> /var/run/motd
-rw-r--r--   1 root root      346 2009-04-20 14:59 motd.tail
-rw-r--r--   1 root root      849 2009-07-02 16:02 mtab
-rw-r--r--   1 root root      624 2008-05-29 21:55 mtools.conf
-rw-r--r--   1 root root     7670 2009-03-30 11:23 nanorc
-rw-r--r--   1 root root     2064 2006-11-23 19:33 netscsid.conf
drwxr-xr-x   6 root root     4096 2009-04-20 14:59 network
drwxr-xr-x   4 root root     4096 2009-04-20 15:09 NetworkManager
-rw-r--r--   1 root root       91 2008-12-23 18:53 networks
-rw-r--r--   1 root root      513 2009-04-20 15:09 nsswitch.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 obex-data-server
drwxr-xr-x   2 root root     4096 2009-04-20 15:02 openoffice
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 opt
-rw-r--r--   1 root root      552 2009-03-21 09:28 pam.conf
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 pam.d
drwxr-xr-x   2 root root     4096 2009-04-20 15:02 pango
-rw-r--r--   1 root root        3 2009-06-30 19:11 papersize
-rw-r--r--   1 root root     1507 2009-06-30 20:30 passwd
-rw-------   1 root root     1507 2009-06-30 20:30 passwd-
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 pcmcia
drwxr-xr-x   4 root root     4096 2009-04-20 14:59 perl
drwxr-xr-x   5 root root     4096 2009-04-20 15:03 pm
-rw-r--r--   1 root root     7649 2009-04-20 15:07 pnm2ppa.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 PolicyKit
-rw-r--r--   1 root root      350 2009-06-30 19:11 popularity-contest.conf
drwxr-xr-x   4 root root     4096 2009-04-20 15:02 power
drwxr-xr-x   8 root dip      4096 2009-04-20 15:06 ppp
lrwxrwxrwx   1 root root       22 2009-06-30 19:36 printcap -> /var/run/cups/printcap
-rw-r--r--   1 root root      497 2009-04-20 14:59 profile
drwxr-xr-x   2 root root     4096 2009-06-30 19:36 profile.d
-rw-r--r--   1 root root     2626 2009-03-05 15:06 protocols
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 pulse
drwxr-xr-x   2 root root     4096 2009-06-30 19:36 purple
-rw-------   1 root root        0 2009-04-20 14:59 .pwd.lock
drwxr-xr-x   2 root root     4096 2009-04-20 15:00 python
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 python2.6
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 rc0.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 rc1.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 rc2.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 rc3.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 rc4.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:30 rc5.d
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 rc6.d
-rwxr-xr-x   1 root root      306 2009-04-20 14:59 rc.local
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 rcS.d
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 readahead
drwxr-xr-x   3 root root     4096 2009-04-20 15:03 resolvconf
-rw-r--r--   1 root root       75 2009-07-02 15:58 resolv.conf
-rwxr-xr-x   1 root root      268 2008-05-03 08:40 rmt
-rw-r--r--   1 root root      887 2009-03-05 15:06 rpc
drwxr-xr-x   2 root root     4096 2009-06-30 20:27 samba
drwxr-xr-x   3 root root     4096 2009-04-20 15:07 sane.d
drwxr-xr-x   2 root root     4096 2009-04-20 15:09 scim
-rw-r--r--   1 root root     3663 2009-02-11 12:17 screenrc
-rw-r--r--   1 root root      666 2009-04-09 01:19 scsi_id.config
-rw-r--r--   1 root root     1347 2009-04-04 06:49 securetty
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 security
-rw-r--r--   1 root root    85602 2008-07-04 09:09 sensors.conf
-rw-r--r--   1 root root    18480 2009-03-05 15:06 services
drwxr-xr-x   3 root root     4096 2009-06-30 19:36 sgml
-rw-r-----   1 root shadow   1083 2009-06-30 20:30 shadow
-rw-------   1 root root     1083 2009-06-30 20:30 shadow-
-rw-r--r--   1 root root      192 2009-06-30 19:24 shells
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 skel
drwxr-xr-x   3 root root     4096 2009-04-20 15:01 sound
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 ssh
drwxr-xr-x   4 root root     4096 2009-06-30 19:36 ssl
-r--r-----   1 root root      557 2009-06-30 19:08 sudoers
-rw-r--r--   1 root root     2277 2009-03-18 22:17 sysctl.conf
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 sysctl.d
-rw-r--r--   1 root root     1626 2009-01-23 18:33 syslog.conf
drwxr-xr-x   2 root root     4096 2009-04-20 14:59 terminfo
-rw-r--r--   1 root root       14 2009-06-30 19:29 timezone
-rw-r--r--   1 root root      645 2008-11-18 23:42 ts.conf
-rw-r--r--   1 root root     1260 2008-05-30 07:22 ucf.conf
drwxr-xr-x   3 root root     4096 2009-06-30 19:33 udev
drwxr-xr-x   3 root root     4096 2009-04-20 15:06 ufw
-rw-r--r--   1 root root      248 2008-11-04 21:37 updatedb.conf
drwxr-xr-x   3 root root     4096 2009-06-30 19:33 update-manager
drwxr-xr-x   6 root root     4096 2009-04-20 15:04 update-motd.d
drwxr-xr-x   2 root root     4096 2009-03-27 08:42 update-notifier
-rw-r--r--   1 root root      116 2009-06-30 19:11 usplash.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:00 vim
-rw-r--r--   1 root root     5169 2009-06-30 22:57 vsftpd.conf
-rw-r--r--   1 root root     5246 2009-06-30 22:42 vsftpd.conf.webmin.bak
drwxr-xr-x   2 root root     4096 2009-04-20 15:06 w3m
drwxr-xr-x 113 root root     4096 2009-06-30 20:43 webmin
-rw-r--r--   1 root root     4221 2008-11-11 13:21 wgetrc
-rw-r--r--   1 root root     1343 2007-01-09 18:39 wodim.conf
drwxr-xr-x   2 root root     4096 2009-04-20 15:07 wpa_supplicant
drwxr-xr-x   9 root root     4096 2009-04-20 15:12 X11
drwxr-xr-x   5 root root     4096 2009-04-20 15:08 xdg
drwxr-xr-x   2 root root     4096 2009-04-20 15:05 xml
drwxr-xr-x   2 root root     4096 2009-06-30 19:36 xulrunner-1.9
-rw-r--r--   1 root root      461 2009-04-17 09:29 zsh_command_not_found

----------------------------------------------------------------------------
Obrigado

Offline slkslk

  • Usuário Ubuntu
  • *
  • Mensagens: 344
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #3 Online: 03 de Julho de 2009, 07:06 »
Esta é uma situação muito estranha. Que eu saiba nem seria preciso parar o serviço, mas enfim... Com permissões de root teria forçosamente de conseguir. Experimente com permissões máximas para vermos se consegue e se conseguir edita o que precisar e volta a por como estava. Assim sendo,

su (coloca a passwd de root)
cd /etc
chmod 777 vsftpd.conf
nano vsftpd.conf (faz as edições que precisar)
chmod 644 vsftpd.conf (para repor as permissões originais e manter a segurança do sistema)

Espero que resulte!

Se mesmo assim não der faça

ls / -la

e poste o resultado.
« Última modificação: 03 de Julho de 2009, 07:17 por slkslk »
“Carpe diem, quam minimum credula postero.”
(Aproveite o dia, acredite o mínimo possível no amanhã), Horácio, Odes I,11,8

Offline dinis_87

  • Usuário Ubuntu
  • *
  • Mensagens: 45
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #4 Online: 03 de Julho de 2009, 14:25 »
Problema resolvido, já consegui editar o ficheiro.
Obrigado ;)

Offline slkslk

  • Usuário Ubuntu
  • *
  • Mensagens: 344
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #5 Online: 06 de Julho de 2009, 05:00 »
Óptimo!  ;D Edite só o tópico no seu primeiro post e coloque [Resolvido] antes do titulo para indicar à comunidade que o tópico está fechado. Desse modo permite que quem possa ajudar não desperdice tempo a ver posts em cuja ajuda já não é necessária.

Cumps
“Carpe diem, quam minimum credula postero.”
(Aproveite o dia, acredite o mínimo possível no amanhã), Horácio, Odes I,11,8

Offline linuxerbel

  • Usuário Ubuntu
  • *
  • Mensagens: 38
    • Ver perfil
Re: Servidor FTP - VSFTPD
« Resposta #6 Online: 19 de Julho de 2009, 11:08 »
Problema resolvido, já consegui editar o ficheiro.
Obrigado ;)

dinis_87,

Seria interessante voce postar como resolveu o problema, para que ajude outros amigos do forum que possam vir a passar pelo mesmo problema.

até mais