Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Laurence Gillian 600 posts 1219 karma points
    Jul 28, 2010 @ 12:57
    Laurence Gillian
    0

    Permissions Issue - Only solved if Umbraco Rewrites the File

    I'm experiencing a very odd permissions issue on a Umbraco install.

    The permissions are set correctly across the site, however Umbraco is seeing all the files are access denied. Oddly enough this can be solved if the file in question is deleted and then rewritten by Umbraco.

    -

    I've set the permissions via the Windows UI and also removed all the permissions and done them manually through the command prompt as well as trying SetACL but this is not solving the issue. If I write click on any item, it is correctly inheriting the permission from its parent however Umbraco still believes it cannot write to it. 

    -

    Its a fairly standard server setup, nothing out of the ordinary. 

    Windows Server 2008 Enterprise, IIS 7.5, .Net 2.0, SQL2008 Enterprise.

    -

    This site was migrated from a Windows Server 2003 box and although permissions should not be migrated, could it be possible that something has slipped across that is breaking the system?

    -

    If anyone has any ideas I would really appreciate it, All the best, Laurie

  • Laurence Gillian 600 posts 1219 karma points
    Jul 28, 2010 @ 13:33
    Laurence Gillian
    0

    Just tried deleted the file, when Umbraco tries to access it, it recreates the file (with the correct permissions).

    But throws a yellow screen of death, 

     

    [ObjectDisposedException: Cannot write to a closed TextWriter.]
       System.IO.__Error.WriterClosed() +57
       System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) +7476040
       System.IO.StreamWriter.Flush() +11
       umbraco.cms.businesslogic.packager.Settings.HasFileAccess(Exception& exp) +433
       umbraco.presentation.developer.packages.BrowseRepository.Page_Load(Object sender, EventArgs e) +46
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

     

  • Laurence Gillian 600 posts 1219 karma points
    Jul 30, 2010 @ 10:59
    Laurence Gillian
    0

    Any ideas chaps? To confirm, permissions are correct.

    I've just removed them all and set them again using a recursive powershell script, and also manually checked them.

    Going to try moving this install across to a few Umbraco install see what happens.

    /Lau

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 30, 2010 @ 11:26
    Peter Dijksterhuis
    0

    Lau,

    I've seen this behaviour if files being copied from 1 server to another.

    It's related to the ownership of the file I believe. No matter what the permissions of the file are, if the ownership doesn't match, the file can't be rewritten. Only thing left is to delete the file and let umbraco recreate it.

    HTH,

    Peter

  • Laurence Gillian 600 posts 1219 karma points
    Jul 30, 2010 @ 16:40
    Laurence Gillian
    0

    Thanks for the response Peter. I have tried this, however when Umbraco creates the file it throws the 'closed TextWriter' error.

    It does create a file, however it seems it cannot write to the file. Interesting the file created does not have 'Network Service' permission, instead it has a permission for the websites domain, which I assume is coming from IIS?

    I have checked the ownership and even forced permissions across the whole site via the wwwroot and also forced new ownership across the folders.

    Odd! Lau

  • Laurence Gillian 600 posts 1219 karma points
    Jul 30, 2010 @ 17:50
    Laurence Gillian
    0

    Okay. I've found a temporary fix.

    If you force write the user credential, even though it doesn't exist on the host machine it oddly works. 

    I have no idea why this works and would 100% not recommend this for production, but its a solution whilst I write something to clone the data inside each file and write it out to a new file. If its reusable I'll post it up here.

    Thanks for the help :) Have a super sweet weekend, Lau Lau

Please Sign in or register to post replies

Write your reply to:

Draft