LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-05-2003, 09:33 PM   #1
r042wal
LQ Newbie
 
Registered: Jun 2003
Posts: 12

Rep: Reputation: 0
Help with permissiond for FTP


I set up a vsFTPd and I have it running in a chroot jail, /home/ftp. The permissions on this folder (ftp) are 777.

Inside the root folder are two other folders, 'downloads' and 'incoming'.

My user's home are /home/ftp and they are members of the group FTP.

Right now, they can log in to the root, but when they attempt to change to the download or incoming folder, they get the message '550 Failed to change directory'

How can I set up the permissions so they can download from the download folder, but they can't create or delete files or folders here?

In the upload folder, I would like them to be able to create files and folders, but not delete them (unless they are the owner).

In the root, they shouldn't be able to create files or folders, only traverse to the 'download' and 'incoming' folder.

Root would have full access.

Thanks
 
Old 06-05-2003, 10:37 PM   #2
Korff
Member
 
Registered: May 2003
Location: Central Florida
Distribution: Gentoo
Posts: 103

Rep: Reputation: 15
So let me get this straight: You have 1 user for the FTP server and its home is /home/ftp. You want that folder to have nothing in it but 2 subfolders, 'downloads' and 'incoming'

You want people to be able to enter and download files from the 'downloads' folder but not write or delete.

You want people to be able to write to the 'incoming' folder but not delete.

Am I correct? Please correct me if I misunderstood.

Personally, I would set the folders all up like this:
Owner: root
group: ftp

And I would go this:
/home/ftp: rwxr-xr-x ||||||| Root can do anything, others can enter the folder and read the contents but not write.
/home/ftp/downloads: rwxr-xr-x: |||||||| Same as above
/home/ftp/incoming: rwx-wx-wx |||||||| Root can do anything; Anyone else can enter and write, but can't delete anything because they can't even see what they're uploading!


An alternative would be to make your "regular" user the group of the incoming folder so you don't have to log on as root to get stuff out of it. So you could do, for /home/ftp/incoming:
Owner: Root
Group: Your username
Permissions: rwxrwx-wx

Let me know how it works out!

Last edited by Korff; 06-05-2003 at 10:39 PM.
 
Old 06-05-2003, 11:24 PM   #3
r042wal
LQ Newbie
 
Registered: Jun 2003
Posts: 12

Original Poster
Rep: Reputation: 0
You were correct on all counst above. Why have I made this so complicated for myself?

It's not much good if the user can't see the contents of the incoming folder. Many public FTP sites have an upload and download folder and you can't delete from either. You can't create anything in downloads, but you can in uploads.

Is what I want to do out of the ordinary?

I have created sevral users. More specifically, this is what it looks like:

I have vsFTPd running in a chroot jail. The ftp root is /home/ftp. There is also the folders /home/ftp/incoming and /home/ftp/download

I have created a few users and made them members of a group called ftpusers. The home directory for the users is /home/ftp and the login shell is /sbin/nologin

The problem I am running into is with the /incoming directory. I want the users to me able to make directories and upload files, but I don't want them to be able to delete anything. I gave group ownership to ftpusers and changed the permissions to 744.

Any user can delete any file or folder from the upload directory. How can I prevent this? This is a private FTP and all users have accounts created in RH.

TIA
 
  


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
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
Knoppix install refuses to boot. No write permissiond to hard drive? R00ts Debian 17 03-26-2005 03:20 PM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 02:07 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:26 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