LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-02-2004, 07:32 AM   #1
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Rep: Reputation: 30
One another FTP query


Hi All ,

We are using RedHat Linux and wu-ftpd Version 2.6.1 .
When we try to login to the server using anonymous login we get following response .

$ ftp myserver
Connected to myserver.
220 myserver FTP server (Version wu-2.6.1-21) ready.
Name (myserver): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:XXXX
530 Can't set guest privileges.
Login failed.


Please help .
 
Old 12-02-2004, 08:25 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Usually the "Can't set guest privileges" means something is wrong with the entry for the ftp user in /etc/passwd. Check to see if the ftp user belongs to the right group and/or has a valid shell and working directory.
 
Old 12-02-2004, 11:42 PM   #3
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Original Poster
Rep: Reputation: 30
Thanx Bathory for reply ....but i dont think is the case . This is the entry for FTP user in /etc/passwd file ....

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

Is there anything wrong you find ? . Please reply .
 
Old 12-03-2004, 04:10 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If /sbin/nologin is a valid shell (I mean it exists in /etc/shells) then it's OK. Take a look also at /etc/ftpaccess to see if there are any wrong settings. I would suggest to look for another ftp server (like proftpd for example) that is more easy to configure.
Regards
 
Old 12-03-2004, 05:02 AM   #5
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Original Poster
Rep: Reputation: 30
Hi Bathory ,

The /sbin/nologin shell was not present in /etc/shells . But i dont think this could be the problem since that entry was there by default . Still for cross check I put the entry /sbin/nologin in /etc/shells ...And tried but Ohhh its still giving the same error as Cant set guest privileges .
Yes what you said could be right . So I'm sending you the contents of /etc/ftpaccess file . Waiting for your comments .

Here is the ftpaccess file with only relevant details ......

deny-uid %-99 %65534-
deny-gid %-99 %65534-
allow-uid ftp
allow-gid ftp

guestgroup ftpchroot
guest-root /test/testftp/ftpdir test

class all real,guest,anonymous *

chmod no guest,anonymous
delete no anonymous
overwrite no anonymous
rename no anonymous

shutdown /etc/shutmsg

# Ask users to use their email address as anonymous password

passwd-check rfc822 warn
 
Old 12-03-2004, 05:37 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Looking at /etc/ftpaccess my comments are:
1st, is there a group ftpchroot? Because you define guestgoup ftpchroot but allow-gid ftp!!!
2nd, since I don't use wu-ftpd anymore, I searched a bit and I found this:
Quote:
# do not check password for anonymous logins
passwd-check none
 
Old 12-06-2004, 12:44 AM   #7
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Original Poster
Rep: Reputation: 30
Ok Bathory

Hi Bathory ,

I have created the group called ftpchroot and added the user (testftp ) in it for whom I want to chroot to . In that case I hope the settings are right . i.e.

guestgroup ftpchroot
guest-root /test/testftp/ftpdir test

Do I need to allow this group in this following statements ??

deny-uid %-99 %65534-
deny-gid %-99 %65534-
allow-uid ftp
allow-gid ftp


Please let me know . Thanx .
 
Old 12-06-2004, 02:16 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Why don't you test if this configuration works?
I think that you must add the ftpchroot in the allow-gid and the testftp in allow-uid. Mind that test and testftp are different UIDs. Take a look here for more details about the ftpaccess.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New FTP Query sachinh Linux - Networking 3 12-03-2004 07:27 AM
FTP Query sachinh Linux - Security 2 11-30-2004 11:32 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 02:07 PM
Linux FTP query sachinh Linux - General 1 09-02-2004 03:23 AM
ftp query fuelinjection Linux - General 8 12-03-2003 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration