1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

plesk folder permissions for access database

Discussion in 'Plesk for Windows - 8.x and Older' started by atokatli, Apr 28, 2005.

  1. atokatli

    atokatli Guest

    0
     
    hi,
    I rented windows 2003 with plesk from layeredtech
    but there is a understandable situation likewise described below (my plesk is 7.0.3)

    one of my customers wanted to a secure place for ms acces databases, because if we put databases in httpdocs, whatever we make,it can be downloaded from web site,

    so, I stareted to search a place a place, a secure place,
    but I can not find
    so, I make a new directory on the main root of the user ftp account (not in httpdocs, in the directory which includes httpdocs error vice versa...) and I give permissions of user to that folder,
    nevertheless I must make this additon to whole my customers today and in the future
    is there any component or program in plesk which gives permissions to directories depending on my desire
    or is there any dos command for this aim
    the seketon system can not allow this process
    when I put under the sketon directory that database directory, whenever I make a new hosting account, it makes a folder likewise defined in the skeleton, but plesk can not give permissions according to the user
    so user can not acces that secure database place for avoiding hacking

    please help me for tihs problem
    where can I put the databases and how can I give permissions via msdos (by writing a program which calls that msdos with parameter periodically)
     
  2. inCharge.co.uk

    inCharge.co.uk Guest

    0
     
    If MS-Access is the most common database for ASP sites, particularly on re-sold webspace, then why is it not supported by Plesk out-of-the-box? In v7 they added a httpdocs/private directory for file-based databases, but didn't give it write permissions. A database that can't be updated? In v7.5 you can use the Plesk file manager to set the permissions. Maybe permissions work on v7.5 Skeletons - haven't tried it yet.

    Meanwhile, if you have Remote Desktop access to the server then you can use Windows Explorer to grant permissions to the domain.com/private folder. Or use a program like XCALCS - free from Microsoft.

    http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/xcacls-o.asp

    This can be run from the command-line or a DOS batch file like this:

    XCACLS "C:\Inetpub\vhosts\domain.com\private" /P IUSR_domain:RWD;RWD /E /T

    If you know how to write ASP/VBScripts (.VBS) then use something like the script below. You could adapt it to run from an ASP web page that allows you to enter the domain name. If you don't write ASP/VBscript then please do not use this code sample as you will probably need to modify it. It is provided as-is and I can't support you if it fails.

    You should also know that if you restore a 7.0.x backup the write permissions are lost and you will have to reset them. This is fixed in 7.5.x

    Cheers,
    Julian

    =============================

    Option Explicit

    Function ExecSynchronous(strCommand)
    Dim WshShell, oExec
    Set WshShell = CreateObject("WScript.Shell")

    WScript.Echo "===>Executing command: " & strCommand

    Set oExec = WshShell.Exec(strCommand)

    Do While oExec.Status = 0 or Not oExec.StdOut.AtEndOfStream
    If Not oExec.StdOut.AtEndOfStream Then
    WScript.Echo oExec.StdOut.ReadAll
    End If
    If oExec.Status = 0 Then
    WScript.Sleep 100
    End If
    Loop

    WScript.Echo "===Result: " & oExec.Status
    WScript.Echo "========================================: "
    End Function

    Function GrantWebFolder(strFolder, strUser, boolWrite)
    Dim strPermissions
    If boolWrite Then
    strPermissions="RWD;RWD"
    Else
    strPermissions="RD;RD"
    End If
    ExecSynchronous("XCACLS ""C:\Inetpub\vhosts\" & strFolder & """ /P " & strUser & ":" & strPermissions & " /E /T")
    End Function

    GrantWebFolder "domain.com\private", "IUSR_domain", vbTrue
     
Loading...