1838660 Members
12816 Online
110128 Solutions
New Discussion

ftpaccess configuration

 
SOLVED
Go to solution
Jose Mosquera
Honored Contributor

ftpaccess configuration

Hi Pals,

I have activated ftpaccess control feature on HP-UX 11.0. Everything looks fine! but when user is loged via ftp in the home directory can't see any inside existent sub-directory. Maybe any parameter defined in /etc/ftpd/ftpaccess is affecting (pls find attached ftpaccess file).

This user definiton in /etc/passwd is:
test:x:102:20:,,,:/home/test/./:/etc/ftponly

Please consider that everything is OK except not being able to visualize the directories inside "/home/test/"

Any tip about?
5 REPLIES 5
john korterman
Honored Contributor

Re: ftpaccess configuration

Hi,

if the user's home dir. is /home/test you should change the home dir. definition in the passwd file for the user to:
test:x:102:20:,,,:/home/./test:/etc/ftponly


hope it helps, regards

John
it would be nice if you always got a second chance
Juan González
Trusted Contributor

Re: ftpaccess configuration

Hi Jose Maria,
I suppose that the user test is a member of the ftpgroup. In this case the home directory field of the password entry is divided into two directories. The first field is the root directory which will be the argument to the chroot call. In your case I suppose it must be /var/ftp. The second half is the users home directory relative to the root directory. The two halves are separeted by /./

In your case could be:
test:x:102:20:,,,:/var/ftp/./test:/etc/ftponly
or
test:x:102:20:,,,:/var/ftp/./incoming:/etc/ftponly

but the user will never log into /home/test. If you want to log there configure the user as a normal one:

test:x:102:20:,,,:/home/test:/sbin/sh

Un saludo
Juan
Sanjay_6
Honored Contributor
Solution

Re: ftpaccess configuration

Hi Jose,

The user is unable to see the directory becaue the command ls does not exist for him. If the user home directory is /home/test/./ . Do this,

cd /home/test
mkdir usr
chmod 555 usr
mkdir usr/bin
chmod 555 usr/bin
cp /sbin/ls /home/test/usr/bin

now ask the user to login and then do a "ls", he should be able to see the directory if the userid/group had read permission.

Hope this helps.

Regds
Jose Mosquera
Honored Contributor

Re: ftpaccess configuration

Sanjay,

On the target Pal..!!!

Thanks a lot

Regards

Jose
Sanjay_6
Honored Contributor

Re: ftpaccess configuration

Hi Jose,

Glad to help.

Regards
Sanjay