PcWinTech.com Forums

Windows Forum => Windows Server 2008 => Topic started by: samh on July 27, 2013, 07:53:59 AM

Title: Folder Redirection Error- Recycling Bin
Post by: samh on July 27, 2013, 07:53:59 AM

Hi there,

Now that the port forwarding problem is out of the way (thanks Shane and Evan!), I can finally focus on finishing setting up the server.

So far I've gotten the domain, users, dns + dhcp, permissions, etc setup. I am now finishing up the project with the folder redirection and department shares.

Currently, I'm getting an error message that the Recycling Bin is corrupted (first for Videos, then pictures, then music. None for Documents though). See pic-

Now I'm getting this on every user account, on every computer I try. Is this issue permissions related or something else? How can I fix it?


Thanks-
Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on July 29, 2013, 01:09:11 PM
Looks like a lot of people have this problem.

Open an cmd.exe window as administrator and try this command

rd /s /q C:\$Recycle.bin

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on July 30, 2013, 12:22:41 PM
Looks like a lot of people have this problem.

Open an cmd.exe window as administrator and try this command

rd /s /q C:\$Recycle.bin

Shane

Hi- Thanks for replying.

After running the command, I get the following error:

"C:\$Recycle.bin\S-1-5-~2 - Access is denied.
C:\$Recycle.bin\S-1-5-~3 - Access is denied.
C:\$Recycle.bin\S-1-5-~1 - Access is denied.
Access is Denied."

The funny thing is when I try to change the permissions I also get an permissions error!  :confused:
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 01, 2013, 04:18:14 PM
Did you open the cmd window as administrator?

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 01, 2013, 05:10:08 PM
Did you open the cmd window as administrator?

Shane


No, I did not at first, but even if I do run the command as an administrator- which gives no errors, I still get the original error on logon.

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 01, 2013, 06:39:18 PM
Is that network path it is looking at still available?

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 01, 2013, 07:39:17 PM
Is that network path it is looking at still available?

Shane

Yes, it is- I'll double check tomorrow.

(But even if it didn't exist, wouldn't it be created automatically?)
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 04, 2013, 03:09:12 PM
If it is on the network you should then be able to remotely the recycle bin and then the problem should go away.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 04, 2013, 03:27:07 PM
If it is on the network you should then be able to remotely the recycle bin and then the problem should go away.

Shane

Well, this error is happening on every computer, including the server!
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 04, 2013, 03:37:24 PM
Can you go to the network path it is complaining about and delete that folder, or even remove that share?

Also is this network share accessed by everyone?

Such as the network files folder and then each computer can see the folders under it?

If so that would explain why ever computer is seeing it. That folder that it is complaining about, the my videos, must have something corrupt in it, deleting it may be the first step.

Have you also ran a chkdsk on the cts server 1?

Doing that would do 2 things.

1. It would make you reboot Windows, which ever a server needs every now and then.
2. It has to reboot in order to do a chkdsk on the drive. If the file system simply needs fixed this may correct the problem as well.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 09, 2013, 09:55:50 AM
Can you go to the network path it is complaining about and delete that folder, or even remove that share?

Also is this network share accessed by everyone?

Such as the network files folder and then each computer can see the folders under it?

If so that would explain why ever computer is seeing it. That folder that it is complaining about, the my videos, must have something corrupt in it, deleting it may be the first step.

Have you also ran a chkdsk on the cts server 1?

Doing that would do 2 things.

1. It would make you reboot Windows, which ever a server needs every now and then.
2. It has to reboot in order to do a chkdsk on the drive. If the file system simply needs fixed this may correct the problem as well.

Shane

I ran a chkdsk and rebooted the server and I still get the same error. And I can't delete the users' Documents, Videos, Pics, etc folder because there are files in them.

I then tried redoing the permissions, and it turns out I get an "Access is denied" when I try to replace permissions on the My Documents (contains Vids, pics, etc) with the "replace all child object perissions with inheritable permissions from this object" box checked. When I went in, I could change permissions on each individual file, and that fixed it... except that isn't practical for 15 users and who knows how many thousands of files... How could I change the permissions without doing each one one at a time?

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 10, 2013, 12:55:08 AM
You could do it with a batch file.

You can grab the subinacl.exe file from the files folder in my windows repair tool at tweaking.com

And in the bat file you could do this

subinacl.exe  /file "C:\Users" /grant=administrators=f /grant=system=f /grant=users=f /grant=everyone=r /setowner=administrators
subinacl.exe /subdirectories "C:\Users\*.*" /grant=administrators=f /grant=system=f /grant=users=f /grant=everyone=r /setowner=administrators

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 10, 2013, 10:58:51 AM
You could do it with a batch file.

You can grab the subinacl.exe file from the files folder in my windows repair tool at tweaking.com

And in the bat file you could do this

subinacl.exe  /file "C:\Users" /grant=administrators=f /grant=system=f /grant=users=f /grant=everyone=r /setowner=administrators
subinacl.exe /subdirectories "C:\Users\*.*" /grant=administrators=f /grant=system=f /grant=users=f /grant=everyone=r /setowner=administrators

Shane

I ran this:
subinacl.exe  /file "C:\NetworkFiles" /grant=Domain Admins=f /setowner=Domain Admins
subinacl.exe /subdirectories "C:\NetworkFiles\*.*" /grant=Domain Admins=f /grant=system=f /setowner=Domain Admins

The permissions did not apply. Now inside "NetworkFiles", there are individual user folders (first initial + last name) with their Documents, etc in them.

How could I modify that code to make Domain Admin as the owner of all files, and setup "JDoe" with full permissions of folder "JDoe" and "ESmith" with full permissions of the folder "ESmith"?

Thanks so much.
Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 11, 2013, 09:51:46 PM
You cant have spaces in cmd.exe commands.

Try
subinacl.exe  /file "C:\NetworkFiles" /grant="Domain Admins"=f /setowner="Domain Admins"
subinacl.exe /subdirectories "C:\NetworkFiles\*.*" /grant="Domain Admins"=f /grant=system=f /setowner="Domain Admins"

The commands work with any user account name there is.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 12, 2013, 10:15:40 AM
You cant have spaces in cmd.exe commands.

Try
subinacl.exe  /file "C:\NetworkFiles" /grant="Domain Admins"=f /setowner="Domain Admins"
subinacl.exe /subdirectories "C:\NetworkFiles\*.*" /grant="Domain Admins"=f /grant=system=f /setowner="Domain Admins"

The commands work with any user account name there is.

Shane

Hi Shane-

Thanks for the help as usual.

I tried to run that and I got an error on the second line of code. See screenshot. I still have the Recycle Bin error too.

(http://forums.pcwintech.com/index.php?action=dlattach;topic=4271.0;attach=13446;image)

Man, this recycling bin error is really driving me crazy!...

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 13, 2013, 12:57:39 PM
I am not seeing any errors, failed says 0.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 13, 2013, 01:38:27 PM
I am not seeing any errors, failed says 0.

Shane

Oh I thought "22296, failed" meant 22296 failed.

I'll finish changing the permission for each individual folder and see what happens!

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 13, 2013, 05:32:43 PM

Shane,

Great news! All is working great now! Thanks so much!  :cheesy: :cheesy: :smiley: :smiley:

Is there any way to automate this process everytime I create an account? It was a pain already to do 10 users, and doing 10, 20 more would be a pain...

Also I want your advice on some Exchange Server setup. Can you help out with that?



Thanks again!!!

Sam

Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 15, 2013, 02:21:33 PM
You can make a bat file and have it set to run on the first login of a user account :-)

And you can use system variables in the bat file like %USERNAME%

I can help with exchange, to a point. Start a new thread for that :-)

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 15, 2013, 07:03:36 PM
You can make a bat file and have it set to run on the first login of a user account :-)

And you can use system variables in the bat file like %USERNAME%

I can help with exchange, to a point. Start a new thread for that :-)

Shane

Though I don't know if the bat file would work as it would need to be run as an Administrator Domain Administrator as users don't have rights to the folder.

Thanks again!  :cheesy:
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 15, 2013, 07:35:51 PM
I have to look it up, but there is a way to run it as another user, could even do it from the task scheduler that way as well :-)

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 15, 2013, 08:42:46 PM
I have to look it up, but there is a way to run it as another user, could even do it from the task scheduler that way as well :-)

Shane

But the thing is I don't know how I could set it up so that it only runs on first-time-ever logins. I don't want it running everytime a user logs in- that could make the computer or server slow and cause errors because of permissions being changed while the user is attempting to access folders & files?
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 17, 2013, 02:22:51 AM
There is a way to do it, are they logging in via a domain? If so there are wys to do what you want when they log into the domain.

http://technet.microsoft.com/en-us/library/cc779490%28v=ws.10%29.aspx

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 17, 2013, 10:31:11 PM
There is a way to do it, are they logging in via a domain? If so there are wys to do what you want when they log into the domain.

http://technet.microsoft.com/en-us/library/cc779490%28v=ws.10%29.aspx

Shane

But the thing is would it run every time a user logged in? Or only for first time logins?

And yes, they are logging in via a domain.

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 19, 2013, 03:22:40 PM
You can have it set to only run once :-)

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 23, 2013, 11:08:23 AM
You can have it set to only run once :-)

Shane

Though we would have to go to the profile tab, then login script box every time we setup a new user account. Anyway around this?Can we have the script automatically put in when an user is created?

Same thing with home folder redirection- can we have it setup automatically instead of having to put in the \\server\folder\%username% every time?


Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 23, 2013, 11:32:24 PM
You can write some vb scripts to do it. Myself, since I am a programmer I havent written my own little tools to do it for me :-)

Like my one customer on Windows 2003, when he gets a new user, instead of me doing it, I made him a program where he puts in their name, password and email address he wants them to have. The program then adds the user to active directory and makes their email address in Exchange :-)

One thing I have always been good at is finding ways to automate things. :wink:

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on August 24, 2013, 07:53:43 AM
You can write some vb scripts to do it. Myself, since I am a programmer I havent written my own little tools to do it for me :-)

Like my one customer on Windows 2003, when he gets a new user, instead of me doing it, I made him a program where he puts in their name, password and email address he wants them to have. The program then adds the user to active directory and makes their email address in Exchange :-)

One thing I have always been good at is finding ways to automate things. :wink:

Shane

That is a really good idea! Never thought of using VB Scripts like that before--! I'll see if I can do something like that.

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on August 26, 2013, 06:31:13 PM
My program is written in vb6, which that same code will work in vb script.

If you need any help just let me know :-)

I am thinking about righting an automation tool for myself, might put it online. I had to reinstall a few servers and have to mauually add each user back and set them all to the right groups. I am going to make a tool that will load a list I give it and do all that repeated work for me :-)

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on September 06, 2013, 08:45:41 PM
My program is written in vb6, which that same code will work in vb script.

If you need any help just let me know :-)

I am thinking about righting an automation tool for myself, might put it online. I had to reinstall a few servers and have to mauually add each user back and set them all to the right groups. I am going to make a tool that will load a list I give it and do all that repeated work for me :-)

Shane

Looks like scripts are really helpful to you- that's awesome.  :cheesy:

I actually came across a weird problem today- I was moving the Win 2008 Server installion from a older 500gb hard drive to a 1tb one. I did what I did usually with moving hard drives- clone the old one to the new. But, the drives had different sector sizes! The 500gb had like a 512b sector size, the new 1tb was a 4kb... Ever come across this issue before? I'm thinking the only way to do it is to image the current drive and then put that image onto the new 1tb drive...

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on September 07, 2013, 04:03:37 PM
Yes I have, and because of that new 4k sector size the drive will be going much slower.

You simply need to change the file system to the new sector size.

http://msdn.microsoft.com/en-us/library/windows/desktop/hh848035%28v=vs.85%29.aspx

One tool, it isnt free can convert it for you without reinstalling Windows.
http://www.paragon-software.com/home/partition-alignment/

I think there is a free way to do it but I havent had to do it much yet. Normally I just use the advanced format tool before I install Windows.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on September 07, 2013, 04:13:13 PM
Yes I have, and because of that new 4k sector size the drive will be going much slower.

You simply need to change the file system to the new sector size.

http://msdn.microsoft.com/en-us/library/windows/desktop/hh848035%28v=vs.85%29.aspx

One tool, it isnt free can convert it for you without reinstalling Windows.
http://www.paragon-software.com/home/partition-alignment/

I think there is a free way to do it but I havent had to do it much yet. Normally I just use the advanced format tool before I install Windows.

Shane

So you're saying I should image the old hard drive to the new and then change the sector size on the new one?

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on September 07, 2013, 04:18:27 PM
You have to, the cloning replaces the file system with the one from the old drive. :wink:

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on September 07, 2013, 04:26:08 PM
You have to, the cloning replaces the file system with the one from the old drive. :wink:

Shane

Yes, that's true, but the software won't let me because the sector sizes are different.

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on September 07, 2013, 04:28:10 PM
What cloning program are you using?

Also I sent you an email, feel free to shot me an email and I have a few tools that might help.

Like I said I like helping fellow techs. Also if you need any code for those scripts let me know :wink:

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on September 07, 2013, 07:25:45 PM
What cloning program are you using?

Also I sent you an email, feel free to shot me an email and I have a few tools that might help.

Like I said I like helping fellow techs. Also if you need any code for those scripts let me know :wink:

Shane

I'm using EaseUS Todo Backup (server edition). I've used EaseUS Personal a few times in the past and have never encountered this problem before.

Thanks so much for your help!

Sam
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on September 09, 2013, 11:23:15 AM
I have always used Norton Ghost. Works pretty good.

Shane
Title: Re: Folder Redirection Error- Recycling Bin
Post by: samh on September 09, 2013, 04:43:01 PM
I have always used Norton Ghost. Works pretty good.

Shane

Not compatible with Windows Server 2008!  :sad:
Title: Re: Folder Redirection Error- Recycling Bin
Post by: Shane on September 10, 2013, 10:05:40 AM
I use the boot cd version, works fine with 2008 :-)

I boot off the cd and use ghost there.

Shane