LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-06-2006, 11:46 AM   #1
fluffyvoidbunny
LQ Newbie
 
Registered: Feb 2006
Distribution: suse fedora
Posts: 16

Rep: Reputation: 0
vsftpd local users read-only


Hello All,
I wish to create a vsftp system where local users can upload files via ftp but cannot delete them via ftp. I've tried setting umask to 0277 which does indeed give the uploaded files the expected permissions of 400 ie readonly. Unfortunately vsftpd still deletes the file as requested by an ftp client logged on with the local users credentials.

I'm running vsftpd 2.04 on suse 10 via xinetd

Thanks
 
Old 02-07-2006, 08:16 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Deleting files depend on the write permission of the directory where the file is stored, not the write permission on the files. So the umask won't help you (as you've already found out).

Unfortunately, you'll need write permission on the directory to allow uploading.

The solution is thus not so trivial as you might expect. You'll need to disallow the "delete" command in FTP.
To accomplish this, I suppose you could use:
-a chroot jail, with no "rm" executable (altough I'm not sure FTP will use the "rm" program to delete the files)
-configure your ftpd to disallow certain commands, in particular the "dele" and "mdel" commands and perhaps also the "rename". But I'm not sure this is at all possible with vsftpd. Perhaps you'll need to switch to a different (more complicated) ftpd for this.
 
Old 02-07-2006, 12:55 PM   #3
fluffyvoidbunny
LQ Newbie
 
Registered: Feb 2006
Distribution: suse fedora
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks,
Yes I got there in the end. vsftpd does allow for specific inclusion of ftp commands in a comma separated list. So the solution was to include the "cmds_allowed=..." entry in my conf file.

Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
VSFTPD local yes outside NO!!??? bogdanosep Linux - Software 3 12-12-2005 04:44 AM
how to authenticate external users but bypass prompt on local LAN users? taiwf Linux - Security 5 07-13-2005 10:01 AM
vsftpd and local users mieslep Linux - Networking 6 11-05-2004 01:21 PM
vsftpd and (some) local users totothehero Linux - Networking 0 09-29-2004 05:08 PM


All times are GMT -5. The time now is 09:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration