Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FTP server to do...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Mon Feb 21, 2005 9:43 am    Post subject: FTP server to do... Reply with quote

I need an FTP server to do the following (which I used to be able to do on my Windows server!):

Have one public username and password, that anyone can log into if they have the password, and they can upload any file they like into the home directory.

However, they mustn't be allowed to delete any of the files in there, even if they uploaded them.

Back on the Windows server, the permissions were:
Files: Read, Create, List, NOT delete
Directories: Read, Create, List, Delete

This meant that:
a) They could add files to the public directory, but not delete them
and
b) They could delete empty directories, but if they had files in them, they couldn't delete the files or the directories.

So what I want to know is what FTP server on Linux will allow me to do this - a) is required, b) would just be nice.

Also, it must be one username only being used, as it is a public username.

Thanks if you can help! Without this I will need to rebuild the server with Windows to get this functionality!
Back to top
View user's profile Send private message
zeroclip
n00b
n00b


Joined: 02 Apr 2004
Posts: 38

PostPosted: Mon Feb 21, 2005 9:46 am    Post subject: Reply with quote

ftp://vsftpd.beasts.org/

Just exclude DELE from allowed_commands=

read the man page.
Back to top
View user's profile Send private message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Mon Feb 21, 2005 9:48 am    Post subject: Reply with quote

Thanks, but can this exclusion of DELE be applied to just my public user, because I definatly don't want a system-wide exclusion of DELE, as normal accounts still need it.
Back to top
View user's profile Send private message
zeroclip
n00b
n00b


Joined: 02 Apr 2004
Posts: 38

PostPosted: Mon Feb 21, 2005 9:51 am    Post subject: Reply with quote

No problem
Just use
user_config_dir=/etc/vsftpd/users
and in that directory (/etc/vsftpd/users)
put a file with the same name as the username and put user spesific options there.
like

/etc/vsftpd/users/public:
allowed_commands=PORT,PASV,RETR,RMD
Back to top
View user's profile Send private message
zeroclip
n00b
n00b


Joined: 02 Apr 2004
Posts: 38

PostPosted: Mon Feb 21, 2005 9:53 am    Post subject: Reply with quote

BTW, You don't need to even use allowed_commands

just set this to no:
Quote:

man vsftpd.conf
anon_other_write_enable
If set to YES, anonymous users will be permitted to perform
write operations other than upload and create directory, such as
deletion and renaming. This is generally not recommended but
included for completeness.

Default: NO


Assuming your using virtual users. Again read the manpage.
Back to top
View user's profile Send private message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Mon Feb 21, 2005 10:05 am    Post subject: Reply with quote

Thanks a lot zeroclip, I'll give that a try when I can get to the server.

BTW, I'm not using virtual users, as all the man page tells me is to use PAM, and I never could work out what that was!
Back to top
View user's profile Send private message
zeroclip
n00b
n00b


Joined: 02 Apr 2004
Posts: 38

PostPosted: Mon Feb 21, 2005 10:11 am    Post subject: Reply with quote

Linux-PAM - Pluggable Authentication Modules for Linux (Check out man pam)

Anyway. Making virtual users is pretty easy. Check out some of the great example configurations here:
ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-2.0.1/EXAMPLE/
Back to top
View user's profile Send private message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Mon Feb 21, 2005 10:13 am    Post subject: Reply with quote

:D

You've just sorted all my Linux FTP problems, thanks a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum