Re: "Permission Denied" and no listing from ls
Bob Luckin <[email protected]> Fri, 9 Jun 2006 20:38:49 -0500
| Newsgroups | gmane.network.ftp.wuftpd.user |
|---|---|
| Message-ID | <[email protected]> |
You are setting your anonymous users' root to /home/ftp/pub :
anonymous-root /home/ftp/pub
I think you meant it to be /home/ftp. That's the directory which contains
the bin subdirectory (which presumably contains the ls binary), and it's
also the value you are specifying to the upload command as the home directory
of the anonymous user.
Try changing
anonymous-root /home/ftp/pub
to
anonymous-root /home/ftp
and see if this works.
Cheers, Bob
On Fri, Jun 09, 2006 at 02:10:25PM -0400, aladdin wrote:
> When I log onto my ftp server anonymously (using "ftp" as the user) the system
> will let me download a file (if I know the name of it; read on), but when I do a directory
> listing, I get:
>
> ftp> ls
> 200 PORT command successful.
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Transfer complete.
> ftp>
>
> I. e., there's no listing. When I cd to incoming, it will not let me upload files, giving me
> a "permission denied" message:
>
> ftp> put index.htm
> local: index.htm remote: index.htm
> 200 PORT command successful.
> 553 index.htm: Permission denied on server. (Upload)
> ftp>
>
> The ftp directory structure is under /home/ftp. Here are the permissions
> (I just completely opened it up for testing, and that didn't do any good):
>
> anw-dev:/home/ftp# ls -laF
> total 36
> drwxrwxrwx 8 root root 4096 2006-06-07 20:56 ./
> drwxrwsr-x 7 anw anw 4096 2006-06-07 20:24 ../
> d--x--x--x 2 ftpadmin ftpadmin 4096 2006-06-07 20:24 bin/
> d--x--x--x 2 ftpadmin ftpadmin 4096 2006-06-07 20:24 dev/
> d--x--x--x 2 ftpadmin ftpadmin 4096 2006-06-07 20:52 etc/
> d--x--x--x 2 ftpadmin ftpadmin 4096 2006-06-07 20:24 lib/
> drwxrwxrwx 3 ftpadmin ftpadmin 4096 2006-06-07 22:38 pub/
> drwxr-xr-x 2 ftpadmin ftpadmin 4096 2006-06-07 20:58 var/
> -rw-r--r-- 1 ftpadmin ftpadmin 346 2006-06-07 20:24 welcome.msg
> anw-dev:/home/ftp# cd pub
> anw-dev:/home/ftp/pub# ls -laF
> total 16
> drwxrwxrwx 3 ftpadmin ftpadmin 4096 2006-06-07 22:38 ./
> drwxrwxrwx 8 root root 4096 2006-06-07 20:56 ../
> drwxrwxrwx 2 ftpadmin ftpadmin 4096 2006-06-07 22:04 incoming/
> -rwxrwxrwx 1 root root 2203 2006-06-07 22:38 index.htm*
> -rw-r--r-- 1 root root 0 2006-06-07 22:03 .notar
> anw-dev:/home/ftp/pub#
>
> Here are some germane lines from my ftpaccess (do you need the whole
> file? Just trying not to clutter too badly):
>
> class users real,guest *
> class anonftp anonymous *
> noretrieve /etc/passwd /etc/group
> noretrieve core
>
> # The directory to which anonymous FTP user will chroot to.
> # Note: if you change this {add,rm}ftpuser may stop functioning.
> anonymous-root /home/ftp/pub
>
> # Password verification for the anonymous FTP user.
> # <none|trivial|rfc822> [<enforce|warn>]
> passwd-check rfc822 enforce
>
> # Maximum connection time in minutes
> #limit-time anonymous 30
>
> # Some permissions for the anonymous FTP user.
> # All the following default to "yes" for everybody
> rename no anonymous # rename permission?
> delete no anonymous # delete permission?
> overwrite no anonymous # overwrite permission?
> chmod no anonymous # chmod permission?
> umask no anonymous # umask permission?
> # Anonymous FTP directories upload settings
> # anon-ftp-root path allow? owner group mode dirs?
> upload absolute class=anonftp /home/ftp * no
> upload absolute class=anonftp /home/ftp /pub/incoming yes ftpadmin ftpadmin 0440 nodirs
> noretrieve /home/ftp/
> allow-retrieve /home/ftp/pub
> noretrieve /home/ftp/pub/incoming
> noretrieve .notar
> log commands anonymous
> log transfers anonymous inbound,outbound
> log security anonymous
> log anonymous
> log syslog
> # What can a filename contain (this /etc is under the anonymous-FTP root)
> path-filter anonymous /etc/pathmsg ^[-+A-Za-z0-9_.]*$ ^\. ^-
>
> # Shortcuts for anonymous FTP incoming (note: the ':' isn't obligatory)
> alias incoming: /pub/incoming
> cdpath /pub
>
> Here is the log:
>
> Jun 9 13:43:44 anw-dev wu-ftpd[4321]: connect from 127.0.0.1 (127.0.0.1)
> Jun 9 13:44:17 anw-dev wu-ftpd[4321]: USER ftp
> Jun 9 13:44:21 anw-dev wu-ftpd[4321]: PASS [email protected]
> Jun 9 13:44:21 anw-dev wu-ftpd[4321]: ANONYMOUS FTP LOGIN FROM localhost [127.0.0.1], [email protected]
> Jun 9 13:44:21 anw-dev wu-ftpd[4321]: SYST
> Jun 9 13:44:23 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:44:23 anw-dev wu-ftpd[4321]: LIST
> Jun 9 13:44:29 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:44:29 anw-dev wu-ftpd[4321]: LIST
> Jun 9 13:44:34 anw-dev wu-ftpd[4321]: CWD incoming
> Jun 9 13:44:40 anw-dev wu-ftpd[4321]: TYPE Image
> Jun 9 13:44:40 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:44:54 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:44:54 anw-dev wu-ftpd[4321]: STOR emacs.config
> Jun 9 13:44:54 anw-dev wu-ftpd[4321]: anonymous([email protected]) of localhost [127.0.0.1] tried to upload /home/ftp/pub/incoming/emacs.config (upload denied)
> Jun 9 13:47:17 anw-dev wu-ftpd[4321]: CWD ..
> Jun 9 13:47:27 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:47:27 anw-dev wu-ftpd[4321]: RETR index.htm
> Jun 9 13:47:27 anw-dev wu-ftpd[4321]: xferlog (send): 1 localhost 2203 /home/ftp/pub/index.htm b _ o a [email protected] ftp 0 * c
> Jun 9 13:47:33 anw-dev wu-ftpd[4321]: CWD incoming
> Jun 9 13:47:36 anw-dev wu-ftpd[4321]: PORT
> Jun 9 13:47:36 anw-dev wu-ftpd[4321]: STOR index.htm
> Jun 9 13:47:36 anw-dev wu-ftpd[4321]: anonymous([email protected]) of localhost [127.0.0.1] tried to upload /home/ftp/pub/incoming/index.htm (upload denied)
> Jun 9 13:47:41 anw-dev wu-ftpd[4321]: QUIT
> Jun 9 13:47:41 anw-dev wu-ftpd[4321]: FTP session closed
>
> TIA,
> allen
--
Bob Luckin [email protected] "Coder, adapt; FTP Ada, redo C"