Operating System - HP-UX
1850101 Members
2439 Online
104050 Solutions
New Discussion

Re: ftpaccess ls not working

 
SOLVED
Go to solution
jerry1
Super Advisor

ftpaccess ls not working

I had checked other posts about the problem
with wu-ftpd restricted user not being able
to "ls" files in ftp home but I still cannot
get "ls" to work. The man page is useless.

I put /usr/bin/ls into ftp user home usr/bin.

I have local ftp user account with home having
/./ in it's path and shell /etc/ftponly.
/etc/ftponly path is in /etc/shells.

Local group entry in /etc/group entry.

/etc/inetd.conf has ftpd -a -l

Ran inetd -c.

/etc/ftpd/ftpaccess has in it:

loginfails 2

class all real,guest,anonymous *

guestgroup transftp

limit all 10 Any /etc/msgs/msg.toomany

readme README* login
readme README* cwd=*

message /welcome.msg login
message .message cwd=*
message .message login

compress yes all
tar yes all

log commands real
log transfers anonymous,real inbound,outbound

shutdown /etc/shutmsg

upload /share/transfers * yes irvftp2 ftptrans 0660


14 REPLIES 14
Sundar_7
Honored Contributor
Solution

Re: ftpaccess ls not working

Did you copy the shared lib as well ? Remember /usr/lbin/ls is a dynamically linked binary.

I would suggest to copy /sbin/ls to /usr/bin/ under user's home directory. This way you dont have to worry about the shared libs.
Learn What to do ,How to do and more importantly When to do ?
jerry1
Super Advisor

Re: ftpaccess ls not working

Already tried /usr/bin/ls /sbin/ls.

/usr/lbin/ls - ??
jerry1
Super Advisor

Re: ftpaccess ls not working

What's interesting is that it looks like
it is still using /usr/bin/ls.

ftp> ls -la
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
Sundar_7
Honored Contributor

Re: ftpaccess ls not working

Sorry , /usr/lbin/ls was a typo.

Did you try this

# cd /users/home/dir
# rm usr/bin/ls
# cp -p /sbin/ls usr/bin/
Learn What to do ,How to do and more importantly When to do ?
jerry1
Super Advisor

Re: ftpaccess ls not working

Already tried /sbin/ls.

john korterman
Honored Contributor

Re: ftpaccess ls not working

Hi,

does the ftp-user in question have the necessary file access rights for e.g. usr/bin/ls?

regards,
John K.

it would be nice if you always got a second chance
jerry1
Super Advisor

Re: ftpaccess ls not working

usr/bin/ls is 555.

Keep in mind that this is

Revision 1.004 Version wuftpd-2.6.1

Under ftp help "ls" is a command option.
john korterman
Honored Contributor

Re: ftpaccess ls not working

Hi again,

I was wondering whether ftpaccess at all is in effect: when you establish a connection does the system then say "access restrictions apply" if not, the described ftpaccess configuration is disregarded.
I take take it that your user is a member of transftp?

regards,
John K.
it would be nice if you always got a second chance
jerry1
Super Advisor

Re: ftpaccess ls not working

Yes ftp access restriction does display
and when putting files, it is following
upload configs in ftpaccess that I want
for perms. 660.

I remeber something about putting ls
in ftpaccess other than just in usr/bin.
And something about putting something
in ./lib for the ftp user to be able to
run ls. But I'm not sure anymore.

Surely there must be some good examples
somewhere?
john korterman
Honored Contributor

Re: ftpaccess ls not working

Hi again,

I am out of possibilities, but just wondering whether the inface expects "dir" instead - may sound idiotic, but have you tried?

regards,
John K.
it would be nice if you always got a second chance
jerry1
Super Advisor

Re: ftpaccess ls not working

If I do a dir then it shows using /usr/bin/ls.

I can do an nlist which shows a short listing.

I am wondering about the ftpaccess man page about:

lsplain
lslong
lsshort

It states that /usr/bin/ls can be switched
to use another path for ls. But I can't get
that to work either.

john korterman
Honored Contributor

Re: ftpaccess ls not working

Hi again,

last attempt: you state that usr/bin/ls permissions are 555, but does the user in question have execute permissions for the usr and usr/bin dirs (I think that is necessary)?

regards,
John K.


it would be nice if you always got a second chance
jerry1
Super Advisor

Re: ftpaccess ls not working

Yes, 555. I copied all the libs too.
jerry1
Super Advisor

Re: ftpaccess ls not working

The solution is to put ls in the directory
before the /./ in the home path.

So with /home/./ftp

ls goes in /home/usr/bin/ls.

And add in /etc/ftpd/ftpaccess

lslong /usr/bin/ls -la
lsshort /usr/bin/ls