Some persional opinions #156

Open
opened 2021-07-04 02:35:55 +00:00 by xcxinng · 2 comments
Contributor

Hi~

Having using ftp server for a while,here are some my suggestion:

file's ownership

I run ftp server on win10 and use ftp client connect to it,when i type dir command,got this:

ftp> dir
200 Connection established (63085)
150 Opening ASCII mode data connection for file list
-rwxrwxrwx 1 root root         1185 Jul  3 18:02 .drone.yml
drwxrwxrwx 1 root root         4096 Jul  4 08:23 .git
-rwxrwxrwx 1 root root           62 Jul  3 18:02 .gitignore
drwxrwxrwx 1 root root         4096 Jul  4 09:03 .idea
-rwxrwxrwx 1 root root         1077 Jul  3 18:02 LICENSE

the owner and group of these file becomes "root" which was specified by the server options,it was not what i expected.If running on linux platform,it should use os.Stat(fileName) to get the real owner and group,instead showing the user and group specified by server options.Sadly,i haven't found a good way to get file's ownership on windows,a relative discuss: https://stackoverflow.com/questions/38840415/go-golang-file-uid-on-windows

authentication control

Users are currently authenticated using the CheckPassswd(),have you ever thought what to do if you need to add a new user? Obviously,you have to add a new use into your server's options and restart your server.Is it possible to use a Lightweight database(sqlite3...etc) or with the help of os to verify the user want to log in.Such as i create a Job account on linux by useradd command, it should use the passwd record in /etc/passwd to log in instead of the passwd specified by server's options.

Look forward to your reply,thanks&regards

Hi~ Having using ftp server for a while,here are some my suggestion: ### file's ownership I run ftp server on win10 and use ftp client connect to it,when i type dir command,got this: ``` ftp> dir 200 Connection established (63085) 150 Opening ASCII mode data connection for file list -rwxrwxrwx 1 root root 1185 Jul 3 18:02 .drone.yml drwxrwxrwx 1 root root 4096 Jul 4 08:23 .git -rwxrwxrwx 1 root root 62 Jul 3 18:02 .gitignore drwxrwxrwx 1 root root 4096 Jul 4 09:03 .idea -rwxrwxrwx 1 root root 1077 Jul 3 18:02 LICENSE ``` the owner and group of these file becomes "root" which was specified by the server options,it was not what i expected.If running on linux platform,it should use os.Stat(fileName) to get the real owner and group,instead showing the user and group specified by server options.Sadly,i haven't found a good way to get file's ownership on windows,a relative discuss: https://stackoverflow.com/questions/38840415/go-golang-file-uid-on-windows ### authentication control Users are currently authenticated using the CheckPassswd(),have you ever thought what to do if you need to add a new user? Obviously,you have to add a new use into your server's options and restart your server.Is it possible to use a Lightweight database(sqlite3...etc) or with the help of os to verify the user want to log in.Such as i create a Job account on linux by useradd command, it should use the passwd record in /etc/passwd to log in instead of the passwd specified by server's options. Look forward to your reply,thanks&regards
Owner

You can find the two interfaces Auth and Perm when creating a ftp server. You can implement them yourself to satisfy the requirements.

You can find the two interfaces `Auth` and `Perm` when creating a ftp server. You can implement them yourself to satisfy the requirements.
Author
Contributor

Do you have any plan on adding these features into ftp server ?

Do you have any plan on adding these features into ftp server ?
lunny added the
feature
label 2021-11-30 06:36:54 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: goftp/server#156
No description provided.