Workaround for FTP problems?


#1

Hi,

I’m currently in a dilemma being how DH does not seem to permit FTP access to certain directories of my website. I have a website and I want to add a gallery section that I am coding myself. The idea is to give other legit users access to that gallery directory and upload pictures. However I do not want them to access my index.php files or anything of that sort as they can modify it or look at passwords/code.

So is there a work around to do the above?

I coding my gallery dynamic such that all they do is upload the folder, and it will instantly show the gallery when a user goes to the index.php page.

Please advise. Thanks


#2

I believe you can accomplish what you describe with directory remapping. The feature is in the Panel > Domains > Remap Sub-dir. Read more about it in the wiki

–Matttail
art.googlies.net - personal website


#3

I have read up on that and it doesn’t accompilsh that.

What it does is you have to create a user, then map a subdirectory to that user. However, since that subdirectory is not stored on your main site’s directory, you cant access it via local directory calls. You need to login via that user’s FTP info in order to access those files.

This makes transferring files from that person’s directory to my website’s directory very time consuming. I basically have to download everything from his directory, then re-upload it to mine.


#4

Problem with giving users full access to a directory is a user could cause havoc to legit files, they could delete, rename them, or since they would know the file name upload a file with the same name and over write the original.
Set your own account up as a shell user then you have access to all the other ftp users in your group. This will allow you to copy/move files to your folder. This can be done manually with telnet, or a cron job, or a small php script that you can run once in awhile or let cron run it.
This will give each user their own private space, while you can update files as needed.
Another option is to create a upload form that will allow a user to upload files and view them from their browser without giving them any damage control. This is probably the route I would take as it involves less effort on your part. Just make sure that only certain file extentions are allowed and any other security measure you can think of. There are a lot of misfits out there that think nothing about screwing up someones website.
Silk

My website


#5

Thanks for the help Silkrooster. I had no idea that you could go up one directory in the shell to see the other FTP users.

Anyhow, my site is being run by 2 people including myself. The other person should not have access to any important files which is what I wanted to accomplish but at the same time be able to upload images if needed to.

I thought about building an upload form, but i need to do ssome research on how you can upload a directory at a time (with 50+ files)… so right now i am going to have to stick to FTP