No announcement yet.

Strange permissions problem

  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange permissions problem

    Our workstations are setup to redirect their My Documents to a server share \\CLA-SRV\Redirected$\jmilano\My Documents. This is mine.

    I create a new folder for my VB.Net 2005 projects under My Documents on my workstation and was happily editing and running my app until it stopped at this line:

    objShell = CreateObject("Wscript.Shell")

    The exception I received was:
    System.Security.SecurityException was unhandled
    Message="Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
    at Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String ServerName)
    at ADUserLastLogon.Form1.Main()
    at ADUserLastLogon.Form1.Button1_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
    at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
    at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
    at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
    at ADUserLastLogon.My.MyApplication.Main(String[] Args)
    at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
    at System.Threading.ExecutionContext.runTryCode(Objec t userData)
    at System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
    at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    This seems to have ocurred as soon as the folder in My Documents on my workstation synchronised with the server. Note that if I look at the target of My Documents on my workstation, I get:

    \\CLA-SRV\Redirected$\jmilano\My Documents

    I have full permissions to the share (I'm the admin!) and I even setup my workstation with full permissions to the share.

    The folders for all workstations are redirected by a GPO:
    User Configuration (Enabled)hide
    Windows Settingshide
    Folder Redirectionhide
    Application Datahide
    Setting: Basic (Redirect everyone's folder to the same location)hide
    Path: %USERPROFILE%\Application Data
    Grant user exclusive rights to Application Data Disabled
    Move the contents of Application Data to the new location Enabled
    Policy Removal Behavior Restore contents

    My Documentshide
    Setting: Advanced (Specify locations for various user groups)hide
    Group Path
    SCL\gGpl_HomeServer_CLA-SRV \\CLA-SRV\Redirected$\%USERNAME%\My Documents
    Grant user exclusive rights to My Documents Disabled
    Move the contents of My Documents to the new location Enabled
    Policy Removal Behavior Leave contents
    Can anyone suggest what might be the problem?

    FYI- I can manually read/write/modify any files in My Documents both on the workstation and server. Visual Basic .Net 2005 seems to not like it.
    +-- JDMils
    +-- Regional Systems Engineer, DotNet programmer & Jack of all trades

  • #2
    Re: Strange permissions problem

    Did you change the SHARE permission from Read Only to Full Control? (Not talking about NTFS permissions here)
    Joined: 23rd December 2003
    Departed: 23rd December 2015


    • #3
      Re: Strange permissions problem

      The Redirected folder share on the CLA-SRV server is set to Everyone with Full Control. I set myself up with FULL security permissions on the jmilano folder but the problem still ocurrs.

      I copied the project to my C drive and it works fine. Something on the redirected share is causing the problem. I copied the project to another server and it did the same thing. Maybe there's a GPO causing this!?

      I'll look further into it.
      +-- JDMils
      +-- Regional Systems Engineer, DotNet programmer & Jack of all trades