I have a a directory with username for each user under "wwwroot" where each user can put his web site. i set up webdav to enable my users to access the content but it seems that they access the hole content for all users (wwwroot). is there a way to specify
that each user access only his content.
As far as I could think of, there'e no other way for webdav to implement this. You may consider use scripts to create these folders and set corresponding permissions.
Hi The folders are already there and each folder name is the same as the username. My only problem is to configure webdav to point to the right username
In this case, you can use powershell scripts to configure the settings. Do an traversal of subfolders, pick up the names which is user related, convert the name as the real user name(e.g domain user), then add corresponding permission for the user to the
folder.
Thanks.
Marked as answer by Lloydz on May 20, 2012 04:01 PM
I'm not sure there is any easier solution, WebDAV isn't designed to control the security, that's up to Windows. Scripting this is a viable solution, and likely the one with the least management after the fact.
i solved it by using .Net. i made an ASP.net web page and put the following code on it
Private Sub CreateWebdav_authering(ByVal vdirname As String)
Dim serverManager As ServerManager = New ServerManager
Dim config As Configuration = serverManager.GetApplicationHostConfiguration
Dim authoringRulesSection As ConfigurationSection = config.GetSection _
("system.webServer/webdav/authoringRules", "Default Web Site/" & vdirname)
authoringRulesSection("allowNonMimeMapFiles") = True
Dim authoringRulesCollection As ConfigurationElementCollection = authoringRulesSection.GetCollection
Dim addElement As ConfigurationElement = authoringRulesCollection.CreateElement("add")
addElement("roles") = vdirname
addElement("path") = "*"
addElement("access") = "Read, Write, Source"
authoringRulesCollection.Add(addElement)
serverManager.CommitChanges()
End Sub
the vdirname is the virtual directory name. i put a login page which authenticates against LDAP and when the user authenticated it passes the username as the vdirename and it activates the webdav authering rule.
tarzan_055
20 Posts
Webdav for multiple users
May 10, 2012 12:52 PM|LINK
jeff@zina.co...
3379 Posts
MVP
Moderator
Re: Webdav for multiple users
May 10, 2012 03:14 PM|LINK
Use NTFS permissions to limit access in the file/folder structure.
Jeff
tarzan_055
20 Posts
Re: Webdav for multiple users
May 11, 2012 08:21 AM|LINK
thats not an option mate coz am talking about hundreds of users.
I already used this link to configure the FTP service.
http://learn.iis.net/page.aspx/600/how-to-use-managed-code-c-to-create-a-simple-ftp-home-directory-provider/
is there a way to user the same way to fix the Webdav
Lloydz
2335 Posts
Microsoft
Re: Webdav for multiple users
May 16, 2012 03:54 AM|LINK
As far as I could think of, there'e no other way for webdav to implement this. You may consider use scripts to create these folders and set corresponding permissions.
Thanks.
tarzan_055
20 Posts
Re: Webdav for multiple users
May 16, 2012 03:01 PM|LINK
Lloydz
2335 Posts
Microsoft
Re: Webdav for multiple users
May 17, 2012 03:27 AM|LINK
In this case, you can use powershell scripts to configure the settings. Do an traversal of subfolders, pick up the names which is user related, convert the name as the real user name(e.g domain user), then add corresponding permission for the user to the folder.
Thanks.
tarzan_055
20 Posts
Re: Webdav for multiple users
May 18, 2012 06:12 PM|LINK
I will get back to you on the solution you suggested and i will wait for a simpler one on this forum.
thanx mate
jeff@zina.co...
3379 Posts
MVP
Moderator
Re: Webdav for multiple users
May 24, 2012 08:11 PM|LINK
I'm not sure there is any easier solution, WebDAV isn't designed to control the security, that's up to Windows. Scripting this is a viable solution, and likely the one with the least management after the fact.
Jeff
tarzan_055
20 Posts
Re: Webdav for multiple users
May 25, 2012 10:06 AM|LINK
i solved it by using .Net. i made an ASP.net web page and put the following code on it
Private Sub CreateWebdav_authering(ByVal vdirname As String)
Dim serverManager As ServerManager = New ServerManager
Dim config As Configuration = serverManager.GetApplicationHostConfiguration
Dim authoringRulesSection As ConfigurationSection = config.GetSection _
("system.webServer/webdav/authoringRules", "Default Web Site/" & vdirname)
authoringRulesSection("allowNonMimeMapFiles") = True
Dim authoringRulesCollection As ConfigurationElementCollection = authoringRulesSection.GetCollection
Dim addElement As ConfigurationElement = authoringRulesCollection.CreateElement("add")
addElement("roles") = vdirname
addElement("path") = "*"
addElement("access") = "Read, Write, Source"
authoringRulesCollection.Add(addElement)
serverManager.CommitChanges()
End Sub
the vdirname is the virtual directory name. i put a login page which authenticates against LDAP and when the user authenticated it passes the username as the vdirename and it activates the webdav authering rule.
regards to all