System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Problem to access to home directory

SOLVED
Go to solution
Jorge Olmos
Occasional Advisor

FTP Problem to access to home directory

Hi experts

I created an new user using useradd

useradd -u 120 -g 1500 -s /TRY/WORK jorge

after that i change the shell for the user to /usr/bin/false

also i enable the ftpaccess using flag -a in inetd.conf for ftpd

i can access from remote server ... but i can´t user the Home directory ... this is the message from remote server

230 User jorge logged in. Access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /usr/bin/ls.
226 Transfer complete.
ftp> bye
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 690 bytes in 2 transfers.
221-Thank you for using the FTP service on cg4.
221 Goodbye.

Also i tried to put some files from another server ... but i have not privileges

Please what i can do to use this folder like an Home directory

Any help will be appreciate

regards

Jorge
15 REPLIES
TTr
Honored Contributor
Solution

Re: FTP Problem to access to home directory

Verify the /TRY/WORK is set in the password file.
Verify the ownership of "WORK" as well as the permissions of /TRY.

After connecting with ftp, run pwd to see where you are placed.
Andrew Rutter
Honored Contributor

Re: FTP Problem to access to home directory

hi,

have you added /usr/bin/false to the etc/shells

a few good links on configuring ftp here

http://newfdawg.com/SHP-FTP-anon.htm

http://www.docs.hp.com/en/B2355-91058/ch02s05.html

are you using the standard /etc/ftpd/ftpaccess file?

if so check the permission and configuration in this file

http://www.docs.hp.com/en/B2355-90685/ch02s08.html

Andy

Steven Schweda
Honored Contributor

Re: FTP Problem to access to home directory

> I created an new user [...]

> after that i change the shell [...]

> also i enable the ftpaccess [...]

General advice: Change one thing at a time.

In particular, I'd change the shell back to
something normal, and see if the user can do
normal work and FTP.

I'd also check the owner and permissions on
the directory.

> After connecting with ftp, run pwd [...]

Yup. When in doubt, ask the computer who
might know what's true.
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

Hi ... i check all yours links .. but i´m still without full access to the ftp folder

more info ...

the owner for the folder is user "CG" .. and my new user jorge has not rights to access to that folder ... how i can give rights to jorge without remove the owner to CG ????

Thanks in advanced

Jorge
Tingli
Esteemed Contributor

Re: FTP Problem to access to home directory

As mentioned before, you should have user's shell put in file /etc/shell.

Also, file /var/adm/syslog/syslog.log will give you some information.
OldSchool
Honored Contributor

Re: FTP Problem to access to home directory

"the owner for the folder is user "CG" .. and my new user jorge has not rights to access to that folder ... how i can give rights to jorge without remove the owner to CG ????"

in that case, but users CG and jorge in the same group. it can be a group with only those two users if need be, for example group CGJ

then change ownership of the directory to user CG and group CGJ.

follow that by changing the permissions to allow the "group" to read/write the directory.
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

Thanks for your help ... the last question

Now i have access and i can transfer files, but when i use "ls" command, i can´t see any files in my Home directory ... what i need to do to see all files ???

regards
OldSchool
Honored Contributor

Re: FTP Problem to access to home directory

you may need to chmod the directory to allow the group "execute" (for directories, that enables search).

can't tell, tho, as you didn't note what error you got when you tried it. if was something like "permission denied" then that should fix it. if not, post the error.
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

This is the output for the folder

drwxrwxr-x 3 cg cg 14336 Aug 21 18:39 proc

but i can´t see the content ... just i can get and put using ftp
Steven Schweda
Honored Contributor

Re: FTP Problem to access to home directory

> drwxrwxr-x 3 cg cg 14336 Aug 21 18:39 proc

That's about half the information needed.

> [...] i can´t see the content [...]

WHO IS "i"?

whoami
who am i


As usual, showing actual commands with their
actual output might be more helpful than
vague descriptions and interpretations.
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

sorry for my poor info ... now i will attach a log with more info ... if you need more .. please let me know.

All the test was made with root user, except the ftp test who was made with jorge user

Regards
Steven Schweda
Honored Contributor

Re: FTP Problem to access to home directory

> guestgroup cg

So, you're setting this up as a guest
account? (That's important news.)

> usr/bin:
> total 120
> -r-xr-xr-x 1 root sys 61116 Aug 31 11:34 ls

You seem to have installed an "ls" in the
right place. Is it the right "ls"? Where
did you get it? The normal "ls"
("/usr/bin/ls") needs a bunch of run-time
libraries, which you don't have in this
chroot file system. The special
(static-linked) "ls" ("/sbin/ls") should work
better.

ls -l /sbin/ls /usr/bin/ls

You want the bigger one. (I believe that
"man ftpd" mentions this.) Did you say
whether this is a PA-RISC or IA64 system?
61116 seems to be too small to be the right
"ls", but its size depends on the hardware,
and I don't have an HP-UX system running
right now, so I can't easily look at mine.

(Or, for extra credit, you could create
"/try/work/proc/usr/lib", and copy into it
all the things needed by the normal "ls", but
that would be the hard way to do it.)
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

Thanks steve for your help ... you give me an idea ... the problem was ...

i´d copy from /usr/bin/ls to /try/work/proc/usr/bin/ls ... but after your email .. i´d copy from /sbin/ls to /try/work/proc/usr/bin/ls ... and all is working now.

Excelente help from you

Case Closed
Jorge Olmos
Occasional Advisor

Re: FTP Problem to access to home directory

Excelent help ...

Thanks
Steven Schweda
Honored Contributor

Re: FTP Problem to access to home directory

Note that with a better description of what
you did, you could have had the same answer
two days sooner.