NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
wormhole1
Feb 15, 2013Aspirant
Ftp access to subfolders or http redirect to multiple shares
Hello, I have a shared folder "websites" in which I have 3 subfolders, each hosting a website for a different user. My problem is I need ftp access to each subfolder to be limited to each user. In...
Sandshark
Feb 21, 2013Sensei - Experienced User
A "share" is nothing more than an alias to a LINUX directory, so you should be able to accomplish either of your alternatives if you enable root SSH access via the add-on and do your work directly in LINUX. If that scares you, you probably shouldn't be trying it even if sombody leads you by the hand. I suppose you could do smoe of this via PHPShell or Ajax Explorer, but SSH is the best since it doesn't rely on FrontView and you can still get in and fix a probelm even if you somehow screw up FrontView.
If you do the appropriate CHOWN and CHMOD to the individual directories, that should control who can write to a directory. Make the user you want to have access the directory owner and give only the owner write access. Or, if you need more than one person to have permission, put them in a group and do the same with group access. If you mess it up, you can use the FrontView Advanced Options for the share and reset the permissions. I've not tried this, but I don't see why it wouldn't work. FTP might be a bit confused and think others can write to it, but the write should fail.
To create web sites, you can either edit the various .conf files in the Apache directory, or you can create totally new ones in the addons folder. I prefer the latter, because manual edits to the standard .conf files can get deleted by changes made via FrontView. But while you are experimenting, it can be a good thing to use the standard files, as they get over-written by a firmware re-install in the event you completely mess up Apache and can't even get into FrontView. I have separate web sites called by separate ports, but there are also ways to have them called by name if multiple ports are a problem for you. Just be mindful of the necessary steps (rewrite rules) to keep from creating a back door to other directories via the port(s) you have opened.
The following, put in a .conf file in addons, will create a site using share "Site1" for website1.com and a port 8085 redirect and block any attempt to get to another directory via port 8085:
You can put as many of these as you like in one file, or as many separate .conf files in addons that you like.
If you do the appropriate CHOWN and CHMOD to the individual directories, that should control who can write to a directory. Make the user you want to have access the directory owner and give only the owner write access. Or, if you need more than one person to have permission, put them in a group and do the same with group access. If you mess it up, you can use the FrontView Advanced Options for the share and reset the permissions. I've not tried this, but I don't see why it wouldn't work. FTP might be a bit confused and think others can write to it, but the write should fail.
To create web sites, you can either edit the various .conf files in the Apache directory, or you can create totally new ones in the addons folder. I prefer the latter, because manual edits to the standard .conf files can get deleted by changes made via FrontView. But while you are experimenting, it can be a good thing to use the standard files, as they get over-written by a firmware re-install in the event you completely mess up Apache and can't even get into FrontView. I have separate web sites called by separate ports, but there are also ways to have them called by name if multiple ports are a problem for you. Just be mindful of the necessary steps (rewrite rules) to keep from creating a back door to other directories via the port(s) you have opened.
The following, put in a .conf file in addons, will create a site using share "Site1" for website1.com and a port 8085 redirect and block any attempt to get to another directory via port 8085:
Listen 8085
<VirtualHost _default_:8085>
ServerName www.website1.com
SSLEngine off
RewriteEngine on
RewriteRule ^/$ /Site1 [R,L]
RewriteRule !/Site1 [F,L]
</VirtualHost>
You can put as many of these as you like in one file, or as many separate .conf files in addons that you like.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!