Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-06-2006, 10:46 AM   #1
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

Old 02-07-2006, 07:16 AM   #2
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, 11:55 AM   #3
LQ Newbie
Registered: Feb 2006
Distribution: suse fedora
Posts: 16

Original Poster
Rep: Reputation: 0
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.


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 06:29 AM
VSFTPD local yes outside NO!!??? bogdanosep Linux - Software 3 12-12-2005 03:44 AM
how to authenticate external users but bypass prompt on local LAN users? taiwf Linux - Security 5 07-13-2005 09:01 AM
vsftpd and local users mieslep Linux - Networking 6 11-05-2004 12:21 PM
vsftpd and (some) local users totothehero Linux - Networking 0 09-29-2004 04:08 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration