#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    112
    Rep Power
    14

    Question FCKeditor upload issue on Windows 2012


    We are moving our website to a Windows 2012 server and being an old site we use Fckeditor. When using the file upload feature to upload images we keep getting the following error:
    Code:
    ADODB.Stream error '800a0bbc'
    
    Write to file failed.
    
    /assets/fckeditor/editor/filemanager/connectors/asp/class_upload.asp, line 272
    Line 272 is
    .SaveToFile sFileName, 2
    from the full code below:
    Code:
    Public Sub SaveAs(sItem, sFileName)
    		If File(sItem).Size < 1 Then
    			nErr = 2
    			Exit Sub
    		End If
    
    		If Not IsAllowed(File(sItem).Ext) Then
    			nErr = 4
    			Exit Sub
    		End If
    
    		If InStr( LCase( sFileName ), "::$data" ) > 0 Then
    			nErr = 4
    			Exit Sub
    		End If
    
    		Dim sFileExt, iFileSize
    		sFileExt	= File(sItem).Ext
    		iFileSize	= File(sItem).Size
    
    		' Check XSS.
    		If Not IsHtmlExtension( sFileExt ) Then
    			' Calculate the size of data to load (max 1Kb).
    			Dim iXSSSize
    			iXSSSize = iFileSize
    
    			If iXSSSize > 1024 Then
    				iXSSSize = 1024
    			End If
    
    			' Read the data.
    			Dim sData
    			oSourceData.Position = File(sItem).Start
    			sData = oSourceData.Read( iXSSSize )	' Byte Array
    			sData = ByteArray2Text( sData )			' String
    
    			' Sniff HTML data.
    			If SniffHtml( sData ) Then
    				nErr = 4
    				Exit Sub
    			End If
    		End If
    		Dim oFileStream
    		Set oFileStream = Server.CreateObject("ADODB.Stream")
    		With oFileStream
    			.Type		= 1
    			.Mode		= 3
    			.Open
    			oSourceData.Position = File(sItem).Start
    			oSourceData.CopyTo oFileStream, File(sItem).Size
    			.Position	= 0
    			.SaveToFile sFileName, 2
    			.Close
    		End With
    		Set oFileStream = Nothing
    	End Sub
    I have set the folder security permissions where images are saved to Full control for IIS_IUSRS but still get this error.

    Any ideas why this is happening, the same code unchanged works on our old servers fine.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    112
    Rep Power
    14
    Ignore me, just solved it by setting full control to USERs on the folder
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,529
    Rep Power
    4541
    Thanks for posting your solution.
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo