View Single Post
  #2  
Old 4th August 2007, 15:19
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
Default

netstat -tap shows proftpd is running...

Code:
tcp6       0      0 *:www                   *:*                     LISTEN     3482/apache2
tcp6       0      0 *:82                    *:*                     LISTEN     3482/apache2
tcp6       0      0 *:ftp                   *:*                     LISTEN     4085/proftpd: (acce
And...

Code:
root@trinity:~/src/mod_mysql_userdir-1.2# ps auxwwwf | grep "ftp"
root      4786  0.0  0.1   2800   752 pts/0    S+   22:56   0:00                  \_ grep ftp
cpanel    4085  0.0  0.3   9132  1528 ?        Ss   20:51   0:00 proftpd: (accepting connections)
So i'm pretty sure it's running...

I checked syslog which shows nothing...probably since it only shows information once a user logs in IIRC, but proftpd.log shows nothing of use from what I can tell either, still....

Code:
root@trinity:~/src/mod_mysql_userdir-1.2# cat /var/log/proftpd/proftpd.log
Aug 03 10:16:15 trinity proftpd[28294] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 03 10:16:15 trinity proftpd[28294] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 03 10:41:16 trinity proftpd[3456] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 03 10:41:16 trinity proftpd[3456] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 03 17:16:08 trinity proftpd[3429] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 03 17:16:08 trinity proftpd[3429] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 04 07:37:02 trinity proftpd[4933] trinity (::ffff:211.234.98.162[::ffff:211.234.98.162]): error setting IPV6_V6ONLY: Protocol not available
Aug 04 07:37:03 trinity proftpd[4933] trinity (::ffff:211.234.98.162[::ffff:211.234.98.162]): FTP session opened.
Aug 04 07:37:03 trinity proftpd[4933] trinity (::ffff:211.234.98.162[::ffff:211.234.98.162]): FTP session closed.
Aug 04 15:59:50 trinity proftpd[3437] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 04 15:59:50 trinity proftpd[3437] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 04 20:37:28 trinity proftpd[3437] trinity: ProFTPD killed (signal 15)
Aug 04 20:37:28 trinity proftpd[3437] trinity: ProFTPD 1.3.0 standalone mode SHUTDOWN
Aug 04 20:37:51 trinity proftpd[3957] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 04 20:37:51 trinity proftpd[3957] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 04 20:38:55 trinity proftpd[3974] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:01 trinity proftpd[3975] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:07 trinity proftpd[3985] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:13 trinity proftpd[3987] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:19 trinity proftpd[3989] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:25 trinity proftpd[3990] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:39:28 trinity proftpd[3992] trinity (::ffff:127.0.0.1[::ffff:127.0.0.1]): FTP session closed.
Aug 04 20:51:20 trinity proftpd[4054] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:51:26 trinity proftpd[4055] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:51:32 trinity proftpd[4056] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:51:34 trinity proftpd[3957] trinity: ProFTPD killed (signal 15)
Aug 04 20:51:34 trinity proftpd[3957] trinity: ProFTPD 1.3.0 standalone mode SHUTDOWN
Aug 04 20:51:57 trinity proftpd[4085] trinity: error setting IPV6_V6ONLY: Protocol not available
Aug 04 20:51:57 trinity proftpd[4085] trinity: ProFTPD 1.3.0 (stable) (built Sat Jul 22 12:08:18 UTC 2006) standalone mode STARTUP
Aug 04 20:52:46 trinity proftpd[4118] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:52:52 trinity proftpd[4120] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:52:58 trinity proftpd[4121] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:53:04 trinity proftpd[4133] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:53:10 trinity proftpd[4134] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:53:16 trinity proftpd[4135] trinity (::ffff:192.168.0.1[::ffff:192.168.0.1]): FTP session closed.
Aug 04 20:54:12 trinity proftpd[4142] trinity (::ffff:127.0.0.1[::ffff:127.0.0.1]): FTP session closed.
Aug 04 20:54:21 trinity proftpd[4144] trinity (::ffff:127.0.0.1[::ffff:127.0.0.1]): FTP session closed.
Aug 04 21:58:56 trinity proftpd[4393] trinity (::ffff:127.0.0.1[::ffff:127.0.0.1]): FTP session closed.
root@trinity:~/src/mod_mysql_userdir-1.2#
My cpanel user has the uid of 1005 as far as I can tell anyways:
Code:
cpanel:x:1005:1001::/home/cpanel:/bin/sh
and the gid is 1004...I think

Code:
cpanel:x:1004:cpanel
Now I have the ftp tables inside my cpanel databse:

Code:
-- 
-- Table structure for table `ftpgroup`
-- 

CREATE TABLE `ftpgroup` (
  `groupname` varchar(16) NOT NULL default '',
  `gid` smallint(6) NOT NULL default '5500',
  `members` varchar(16) NOT NULL default '',
  KEY `groupname` (`groupname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ProFTP group table';

-- 
-- Dumping data for table `ftpgroup`
-- 

INSERT INTO `ftpgroup` (`groupname`, `gid`, `members`) VALUES ('cpanel', 1004, 'cpanel');

-- --------------------------------------------------------

-- 
-- Table structure for table `ftpquotalimits`
-- 

CREATE TABLE `ftpquotalimits` (
  `name` varchar(30) default NULL,
  `quota_type` enum('user','group','class','all') NOT NULL default 'user',
  `per_session` enum('false','true') NOT NULL default 'false',
  `limit_type` enum('soft','hard') NOT NULL default 'soft',
  `bytes_in_avail` int(10) unsigned NOT NULL default '0',
  `bytes_out_avail` int(10) unsigned NOT NULL default '0',
  `bytes_xfer_avail` int(10) unsigned NOT NULL default '0',
  `files_in_avail` int(10) unsigned NOT NULL default '0',
  `files_out_avail` int(10) unsigned NOT NULL default '0',
  `files_xfer_avail` int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Dumping data for table `ftpquotalimits`
-- 

INSERT INTO `ftpquotalimits` (`name`, `quota_type`, `per_session`, `limit_type`, `bytes_in_avail`, `bytes_out_avail`, `bytes_xfer_avail`, `files_in_avail`, `files_out_avail`, `files_xfer_avail`) VALUES ('exampleuser', 'user', 'true', 'hard', 15728640, 0, 0, 0, 0, 0);

-- --------------------------------------------------------

-- 
-- Table structure for table `ftpquotatallies`
-- 

CREATE TABLE `ftpquotatallies` (
  `name` varchar(30) NOT NULL default '',
  `quota_type` enum('user','group','class','all') NOT NULL default 'user',
  `bytes_in_used` int(10) unsigned NOT NULL default '0',
  `bytes_out_used` int(10) unsigned NOT NULL default '0',
  `bytes_xfer_used` int(10) unsigned NOT NULL default '0',
  `files_in_used` int(10) unsigned NOT NULL default '0',
  `files_out_used` int(10) unsigned NOT NULL default '0',
  `files_xfer_used` int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Dumping data for table `ftpquotatallies`
-- 


-- --------------------------------------------------------

-- 
-- Table structure for table `ftpuser`
-- 

CREATE TABLE `ftpuser` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `userid` varchar(32) NOT NULL default '',
  `passwd` varchar(32) NOT NULL default '',
  `uid` smallint(6) NOT NULL default '5500',
  `gid` smallint(6) NOT NULL default '5500',
  `homedir` varchar(255) NOT NULL default '',
  `shell` varchar(16) NOT NULL default '/sbin/nologin',
  `count` int(11) NOT NULL default '0',
  `accessed` datetime NOT NULL default '0000-00-00 00:00:00',
  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `userid` (`userid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COMMENT='ProFTP user table' AUTO_INCREMENT=2 ;

-- 
-- Dumping data for table `ftpuser`
-- 

INSERT INTO `ftpuser` (`id`, `userid`, `passwd`, `uid`, `gid`, `homedir`, `shell`, `count`, `accessed`, `modified`) VALUES (1, 'exampleuser', 'secret', 1005, 1004, '/home/www.example.com', '/sbin/nologin', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
Also Just wondering while i'm here what I would need to do to change it so that passwords are MD5 encrypted? I assume you just store the passwords in that way then change SQLAuthTypes.

And finally to show you what exactly it does when I try to connect...

Code:
root@trinity:~/src/mod_mysql_userdir-1.2# ftp localhost
Connected to localhost.
421 Service not available, remote server has closed connection
ftp>
Thanks in Advance.
Reply With Quote