Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm reading up how to interface ProFTPd with MySQL for an implementation I'm working on, I noticed it seems like all the example code or instructions I see have the user login field in MySQL set as "varchar(30)".

I don't see anything saying there's a limit to the field length for ProFTPd, but I wanted to check around anyway. The project this setup is going to get mixed into was planning to have their universal usernames support "varchar(255)". Can I use that safely? or is there an FTP limitation elsewhere I'm missing?

Running ProFTPd 1.3.4a(custom compiled), MySQL 5.1.54(ubuntu repos)

share|improve this question

1 Answer 1

Just tried it out anyway on my implementation using this layout:

CREATE TABLE IF NOT EXISTS `users` (
  `userid` varchar(255) NOT NULL,
  `passwd` varchar(255) NOT NULL,
  `uid` int(11) DEFAULT NULL,
  `gid` int(11) DEFAULT NULL,
  `homedir` varchar(255) DEFAULT NULL,
  `shell` varchar(255) DEFAULT NULL,
  UNIQUE KEY `userid` (`userid`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Tested by connecting using filezilla with a 180 character username, I don't believe they should reach that high but we want the safety and will limit the length at creation not the DB level. Anyhow, looked like it worked with the 255 field size. I would have created and checked a 255 character username, I just didn't have the time with the system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.