LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   vsftpd with one account upload only and other account download only (https://www.linuxquestions.org/questions/linux-server-73/vsftpd-with-one-account-upload-only-and-other-account-download-only-822756/)

ahmadnawaz 07-28-2010 10:02 PM

vsftpd with one account upload only and other account download only
 
Hi there,

I have googled around but couldnt find the relevant info.

My question is like this:

I want to setup VSFTPD such that it has 2 users

1. User A which has access to a folder /var/www/html/abcd [in webroot]. So that this user can upload some files. The user must be able to upload files to this folder and shouldn't have rights to do anything else. Do I need to set the appropriate permissions also?

2. User B which has access to a folder outside webroot. Let's say it is /abcd. The user must have only download rights and can't do anything else.

When I say anything else, I mean: Directory listing is ok but can't delete files or change permissions, etc, etc

Referring to User A: actually our website has a daily magazine which includes just HTML pages. Uploading them through SSH is really not a good option coz only I know the SSH password and I cant give access to others.

Referring to User B: its purpose is to download the contents (pictures, music,etc) uploaded by our websites users. The main purpose is to take backup of all such stuff.

I did some googling but just couldn't get this info that how can I make 2 users who behave differently and have different set of permissions.

Any help, howto, quick-start will be greatly appreciated.

Thanks in advance :)

PS: I also have postfix, apache and mysql running on this machine. Setting up postfix was a very difficult task. So, Im kind of reluctant in changing the PAM settings and stuff. Thanks again :)

kbp 07-29-2010 08:13 AM

If User A is given upload rights they will also be able to delete and download. You should be able to set this up just with file permissions - chroot User B into a directory that s/he doesn't have write access to

ahmadnawaz 08-10-2010 11:52 PM

can u plz explain little more
 
any quick-starts you may refer to.. because im really not sure where to start from...


All times are GMT -5. The time now is 10:37 PM.