LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-02-2004, 05:27 PM   #1
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
File/Folder Permissions with FTP


Hello,

I have an FTP server using VSFTPD. First, it's a major PITA to get working right because the config file is so picky about everything. . . .

However, I have a question about folder and file permissions. I want to allow a user to upload files and copy files down but not REMOVE files from the server via the cut gui tool. What I have is a folder named x and I set permissions for read and write to the ftp user. However, on the files within the folder, I set the permissions as read only. However, this doesn't seem to work because when I FTP from a different box, I can cut files right out of the server. This I do not wish to happen.

Does anyone have any ideas as to how I can get this to work the way I want it to? Thank you.
 
Old 01-04-2004, 02:01 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I want to allow a user to upload files and copy files down but not REMOVE files from the server (...) What I have is a folder named x and I set permissions for read and write to the ftp user. However, on the files within the folder, I set the permissions as read only.

Removing a file changes the listing of its parent dir (it's a filesystem thing). If you would change files to have mode 0700, the parent dir 0500, then remove the file you'd see it would fail. With respect to your email, it would be best if download and upload are separate dirs. Especially if you allow anonymous uploads, the upload dir should not have read permissions and uploaded files should be chmodded to an "inactive" user. This way uploads are not accessable and the risk this feature can be abused will be smaller.

Last edited by unSpawn; 01-04-2004 at 04:14 PM.
 
Old 01-04-2004, 03:40 PM   #3
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Thanks a lot!! That worked out fine. I can't believe I had never thought of that before. DUH!! ) Have a good week!
 
Old 01-09-2004, 04:46 PM   #4
katmai90210
Member
 
Registered: Nov 2003
Location: Romania
Distribution: Redhat Linux , Fedora & SuSe
Posts: 46

Rep: Reputation: 15
if the VSFTP is so picky why don't you get proFTPD or pureFTPD ??? easier to install and also to configure
 
Old 01-09-2004, 05:14 PM   #5
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Hi Kat,

Well, I screwed up my entire drive by trying to modify permissions. Someone was able to access the root directory and when I tried to figure out what happened, I locked myself completely out of the machine. I could not boot to the GUI which kind of made the system useless. However, I will when I have the time to reinstall Linux your suggestions.
 
Old 01-10-2004, 12:55 AM   #6
katmai90210
Member
 
Registered: Nov 2003
Location: Romania
Distribution: Redhat Linux , Fedora & SuSe
Posts: 46

Rep: Reputation: 15
in the config file ... set up that line that says that users will be chrooted into their home dirs ... at least in proftpd i know it is ...
 
Old 01-10-2004, 08:20 AM   #7
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Original Poster
Rep: Reputation: 30
Thanks, as I said, when I have some time, I'll try those programs but right now, I'm packing to be moving so there's not much time that will be spent on the computer right now.
 
Old 01-23-2004, 09:33 AM   #8
enteal
LQ Newbie
 
Registered: Aug 2003
Location: Brazil
Distribution: Red hat 8.0
Posts: 13

Rep: Reputation: 0
Vsftpd chroot

Hi

To u configure on vsftpd the chroot... u have 2 ways...
first go in vsftpd.conf and uncoment the line "chroot_list_enable=YES"
the ways:

1 - Chroot_list: u have to uncomment the line "chroot_list_file=/etc/vsftpd.chroot_list" and after it create the archive vsftpd.chroot_list on /etc , put the user names u want to limit on him folder.

2 - U can write a line enabling all local users to their folders. add a line "chroot_local_user=YES"

Rafael...

Visit our site...
http://www.suacidade.com.br
 
Old 03-12-2004, 02:19 PM   #9
RedCatcher
LQ Newbie
 
Registered: May 2003
Location: Colorado
Distribution: SuSe 9.0 Pro
Posts: 2

Rep: Reputation: 0
It is interesting I found this thread as it's similar to the same issue I have. I am using Pure-FTPD and a FTP server and have setup an upload directory if limited permissions (world has write only). The rest of the directories are all RWX (user and group). My problem is that if someone is wanting to load a program that has sud-directories they are given an error message that they can not recreate the directory.

Anyone have a fix for that?

Red
 
  


Reply



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
File/folder permissions Yig Linux - Newbie 3 11-28-2005 03:44 PM
File and folder permissions steve007 Linux - Newbie 3 06-30-2005 03:48 AM
File and Folder permissions seelk SUSE / openSUSE 9 01-28-2005 06:50 PM
File / folder Permissions bkbroil Linux - Newbie 3 10-15-2003 10:37 AM
Folder/File Permissions Question? gsmonk Linux - General 8 07-20-2003 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:27 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
Open Source Consulting | Domain Registration