[help]About giving ftp access to a new user


#1

My idea is:

Ftp_Master
L–SiteA
L–SiteB
L–SiteC

I want to give
Ftp_UserA1 access to SiteA/Ftp_UserA1,
Ftp_UserA2 access to SiteA/Ftp_UserA2,
Ftp_UserB1 access to SiteB/Ftp_UserB1, and
Ftp_UserC1 access to SiteC/Ftp_UserC1 only.

Besides, Ftp_UserA1 can only access to SiteA/Ftp_UserA1, so do the other ftp users.

To do so, Ftp_Master can have full control of all ftp users. And I can use this Ftp_Master to manage all file uploaded by other ftp users. Even move those files from/to siteA to/from SiteB/C.

Can I do that? And how?

I have tried the Remap Sub-dir, but it didn’t give me what I want.

http://wiki.dreamhost.com/index.php/KB_/Account_Control_Panel/Domains::_Remap_Sub-Dir

http://wiki.dreamhost.com/index.php/KB_/Account_Control_Panel/Users::_Users


#2

Probably. As for “how”, the only thing I can think of is an extremely convoluted and (in my opinion) hard to manage/maintain series of groups, chmods, and cron jobs. I wouldn’t handle it that way for fear of screwing it up and/or the aggravation of managing it.

I’d set up a series of “filemanager” type scripts in the appropriate directories, and retain “ownership” of all the files in the directories under my control, but that’ just my way of handling it, and YMMV. Good luck! :slight_smile:

–rlparker


#3

To rlparker

Thanks for reply, but i can’t get it, i’m totally new to web server. Did you mean the way I described is not secured or impossible? How to set up filemanager/other method to have the same purpose?

Thanks for your help.

Epee


#4

I suppose it is “reasonably” secured (though you have to have complete faith in your “users’” abilities and actions), and , while it may not be “impossible” it would be very complicated to set up and maintain (you’d have to become very familiar with the tools I mentioned in my previous post). An example of what I was talking about can be found in the DH Wiki article on Unix Groups, and some more info in the DH Wiki article on Unix File Permissions (and the “Cookbook” article linked at the bottom of that page).

Another approach is to just build your directory structure as you want, but retain all the ownership of the files yourself while allowing users to upload into various directories via a script, instead of via ftp as “full-on” *nix users.

To do this just upload/configure an appropriate script in each directory you want the users to be able to upload to and let them use the script to accomplish their uploads.

I have used ffileman for this purpose, and it works very well. It is easy to install, allows you to control what types of files are uploaded, and presents an interface to the user that is simple and functional. You can have multiple users “share” a directory by allowing them to share a user/pass combination, and you will be set.

The end result should be the same (users can upload to, and manipulate files in, only certain directories) but your life will be *much easier, as you will “own” all the files.

–rlparker


#5

Thank you buddy. It’s very helpful. I’ll try to use the scrip thing.

Epee


#6

You are welcome, and I really do think you will be happier with that result. The script I suggested is pretty nice for what you intend, but there are many such scripts if you don’t like that one.

One last suggestion is to use a script written in perl (like the one I suggested), instead of one in written in PHP, so you avoid issues with the DH default max-upload_filesize setting on PHP. Good Luck, and let me know how it turns out! :slight_smile:

–rlparker