How to set a specific folder for ftp root folder

How to set a specific folder for ftp root folder

Posted by: sdrawkcab
Posted on: 2007-07-28 18:08:00

I want to allow users to ftp access to a specific folder under a subdomain of mine. How do I specify this? Right now, it defaults to giving users access to their OWN folder and not a shared folder for that account. Is this possible?

Re: How to set a specific folder for ftp root fold

Posted by: Lensman
Posted on: 2007-07-28 18:15:00

What specifically do you need?

1. Do you want all users to have access to this folder?
2. Do you want users to be able to use web ftp? Would they be happy with just a regular ftp client?
3. Do you want users to have write access to this folder?
4. Does this folder have to be web-accessible? In other words, browser accessible via something other than ftp?

Sorry for all the questions, but the best answer depends on exactly what you want to achieve.

Re: How to set a specific folder for ftp root fold

Posted by: sdrawkcab
Posted on: 2007-07-28 18:18:00

1. Do you want all users to have access to this folder? Not all, this is really only going to be for one user account which we will give out to people who need its access rights.

2. Do you want users to be able to use web ftp? WebFTP is optional, but standard ftp is required.

3. Do you want users to have write access to this folder? Yes, they will have full control over the folder.

4. Does this folder have to be web-accessible? Yes, this will be an ftp account for a development subdomain that will be hosted on the primary site (studio.site.com).

So basically, we will have studio.site.com setup, with a studio ftp account which points to the /home/user/site.com/studio folder where the development team can ftp in there and upload test modification and skins to.

Re: How to set a specific folder for ftp root fold

Posted by: Lensman
Posted on: 2007-07-28 19:35:00

I think the *easiest* way to do this is to create a symbolic link from your web directory to a directory of the ftp user you created. It should probably best be a subdirectory off of the home directory of the ftp user.

By default, the unix groups of your main unix user and this new ftp user should be the same and you should have group read access to those files and so the directory and files should be web accessible. (I think)

Check this out, if it doesn't work, we'll have to do some work with unix groups and permissions.

Re: How to set a specific folder for ftp root fold

Posted by: sdrawkcab
Posted on: 2007-07-29 07:19:00

I have tried this, and set appropriate permissions, however, it does not appear to work. Under our old host, we could easily specify home directories for each user. Is there no way to do this? This is a feature we require otherwise I am afraid we might have to move.

Re: How to set a specific folder for ftp root fold

Posted by: rlparker
Posted on: 2007-07-29 08:21:00

In reply to:

Under our old host, we could easily specify home directories for each user. Is there no way to do this?


Not that I am aware of. frown. You can specify the "home" directory of each "domain" easily enough, but user directories are established by DreaHost at user creation time.

Looking at your earlier post(s), while I am not willing to say what you are proposing cannot be done, doing it the way your describe it with FTP would be, at best, a complicated process of custom user group creation and permission settings, likely involving cron scripts to modify permissions (see this wiki article).

Why don't you just employ a "filemanager" type script to handle the "shared" aspects of you setup? This allows finer control, leave all files owned by "your user" (DreamHost uses suexec), and should be far more secure.

You might also consider employing remapping sub-dirs, but IMO ustilizing a script or scripts is a better approach to take.

--rlparkerEdited by rlparker on 07/29/07 08:36 AM (server time).

Tags: root folderftp accesssubdomain