Solved

Need to remove read only from folder and every thing below it..

Posted on 2004-09-22
33
283 Views
Last Modified: 2008-01-09
Runing server 2003
Logged in as an admin.
Cannot remove read only
have tried using windows GUI, but it will not hold.
Have gone to command prompt and don a attrib -r /s
files will not rest.

What am I doing wonrg?  Admin has full access to that folder etc.
0
Comment
Question by:mrchaos101
  • 17
  • 10
  • 4
  • +2
33 Comments
 

Expert Comment

by:NetGainKY
ID: 12127323
http://support.microsoft.com/default.aspx?scid=kb;EN-US;326549

I ran into this issue migrating shares from an old NT4 server to a Windows 2003 Domain Controller in the same domain.  It took changing copy methods (used robocopy) to get it to work, however to this day they still show Read Only as checked.  However, the files CAN be modified and new files created.  

Perhaps there is a file within the folder that you do not have rights to?  Take ownership and give full NTFS permissions to Administrator, and apply the setting to child folders / objects, then try it and see if you have any luck

0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12127356
Ok... Im still abit of a noob.

How do I Take ownership and give full NTFS permissions to Administrator, and apply the setting to child folders / objects, then try it and see if you have any luck?


AND I did copy from NT4 cer to windows 2003  how should I copy in the future to avoind problems?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12127497
Sorry about the spelling there... was in a hurry as boss was yellling fax machine is down.

MENT to say..
How do I Take ownership and give full NTFS permissions to Administrator, and apply the setting to child folders / objects?

and, I did copy the folders from an NT 4.0 server to a windows 2003 server. Im sure you have found the problem.  How should I copy in the future from NT to 2k3 to avoid this problem?

ALSO I have tried the cmd attrib -r /s as recomended in your link but it is not resetting.
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 12128120
right Click on the top level folder and go to properties.
Select the Security Tab
Click the Advanced Button
Click the owner tab on the window that appears.
Select the new owner for the folder and put a check in the box for "Replace owner on subcontainers and objects"
Click Apply (or OK).

This will change the owner info for the folders and subfiles/folders.

OK out of the Advanced Security settings and back on the properties page add the user names you want to have permissions and set the permissions appropriately.  Then see if you can access the files.

As for copying files, I've never used Robocopy, but I've heard numerous good things about it.  I've typically used either Xcopy or SCOPY (comes with the NT4 resource kit).

Good luck

0
 

Expert Comment

by:NetGainKY
ID: 12128195
To take ownership, right click the folder, go to properties.  Click on the Security tab, then the Advanced button near the bottom.  There should be an "owner" tab, click that one and select Administrator from owner.  It should show you the current owner, which may already be administrator... select it anyway, check the "Replace ownership on subcontainers and objects" then click apply.

The resolution to my problem was to use the NT Resource Kit utility "robocopy", also included on the Windows 2000/2003 Resource kit.  If you're lazy, you can also download the robocopy.exe to windows system folder from http://www.heinekev.com/robocopy.exe to save time.  Once you install the resource kit, the proper syntax for Robocopy are as follows

(Do this from the new 2003 server)

First, share the folder that needs to be copied (or if it's already a share, all the better) from the NT server

then, run robocopy to copy that share over to the 2003 server

robocopy \\NT_SERVER\Sharename local_path /E /ZB

In my case, the systax was

robocopy \\nt_pdc\shared e:\data\shared /E /ZB

the /E flag copies All sub folders, even empty ones
the /ZB flag bypasses permission issues and copies all files as if it were a backup service

You should be good to go from there!  

Let me know if there are any issues getting this up and running.  We can also migrate the share permissions as well, if needed



0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12133473
Ok I did as you said

I still cannot get the read only off the folders and sub folders.
How do I give Admin full NTFS?  isn't that given by default?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12133502
I cecked the folder and who had auth to I have check markes in every thing .. I asume that is full auth.

It stil witll not allow me to change the attribute
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12134974
If I use robocopy and copy a folder from NT 4.0 to 2k3,  it will keep all the atributes that were on those files on the nt 4 server right?>

ALSO I would like to be able to change these atribuets any time int he future.
0
 

Expert Comment

by:NetGainKY
ID: 12135958
Yeah it'll keep the attributes.  After you did the robocopy, were you able to modify the files? Even with the read only attribute
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12136153
if you really want to rip away all the permissions, you could just copy the files to a FAT32 partition, and then back to NTFS again. that will clear all the permissions and should allow you to change attributes. this certianly isn't a very efficient way of doing it, but until somebody comes up with a faster idea, maybe it's worth a try
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12137610
Formatting a drive to FAT32  this may work

Lets say I do this.. copy my files to that drive.. is it HARD or dangerous to then UPGRADE the FAT32 to NTFS with files on it?
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12142713
to convert a FAT32 drive to NTFS, you just type...
convert c: /fs:ntfs
at the command line, where C: is the drive you are converting.

while it its *always* recommended to back up data before doing any kind of file system conversion, i've never seen or heard of this specific conversion ever causing data loss. if you can i'd certianly recommend a backup, just in case.
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12171599
Im still working on the issue I had to take a few days off. I will try to day moiving the files to a FAT32 and then removing the attrib there and THEN moving to server 2k3.

If it all goes I will award the points :)
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12181141
omg  HELP!!!

I split up my drive partition.  I left the C: as NTFS with the os etc.

I then to all the unallocated space in partiton magic an formated it as FAT32 as recomended.
I then copied files from my server 2k3 to the FAT32. It said some information would be lost. I copied it assuming this was the user access. I then tried to a  attrib -r -h -s /s /d  command to remove all of it in all sub folders.

I go in to the fodler and still see the read only box marked in green.  It seems that i am still unable to remove the attribuets  :(
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12181274
Try downloading arcset...see if it can remove those attributes for you...

http://www.handyarchive.com/download/1510/Arcsetin.exe
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12181337
I tried arcset... it said 0 out of x  files checked.  

Doen't seem to help.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 20

Expert Comment

by:DVation191
ID: 12183582
maybe i'm wrong, but shouldn't the command be ..
attrib -R -A -S -H *.* /S /D
?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12183738
I ran it tha way to... it seems to do the same thing/

IN windows XP the box where you normaly have a chek mare for READ ONLY is GREEn.

In server 2k3 ,.. its grayed out with a check mark.

This is realy fustrating me.
0
 
LVL 20

Accepted Solution

by:
DVation191 earned 500 total points
ID: 12183826
I believe this is your issue....
http://mcpmag.com/columns/article.asp?EditorialsID=652

You might want to pay these sites a visit as well...

You Cannot View or Change the Read-Only or System Attribute of Folders
http://support.microsoft.com/default.aspx?scid=kb;EN-US;326549
(this link was posted above, in case you didn't read it...)

Unable to Remove Read-Only Attribute from Folder
http://support.microsoft.com/default.aspx?scid=kb;EN-US;256614
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12183871
Another point...if a file inside a folder is read-only...like the all-too-common desktop.ini for example, the folder it is in will show a greyed out read-only tick mark as well. this may or may not be your situation.
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12183904
aye.  my goal is to take  folder X and remove all attrbutes to it... and all files and folders in it.
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12183942
does the workaround fix your problem by chance?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12183954
DVation191

ok, this is leading to a new problem.  I am logged into to the windows server 2k3 machine....
It say that the system registry editor has been disabled by the system admin.

I am the system admin.  How do I turn this back on so I can can change they key in your link?
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12184000
are you logged on as a local administrator or the domain administrator?
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12184003
or group policy preventing this?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12184024
Domain admin... I didnt think to log in as local. I will try that now.
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12184035
Bah that didn't work,  It only allows me to log into that doman,  Not <local machine> like the xp clinet does.
0
 
LVL 20

Expert Comment

by:DVation191
ID: 12184047
maybe we are going about this the wrong way.

why do you need to remove the read-only attributes of this data?
0
 

Expert Comment

by:NetGainKY
ID: 12184171
I'm with DVation, I'm not so sure it's a read-only attribute issue...

You are logged in as Domain Admin and you cannot access the registry editor?  That should not happen and you may have a more serious issue at hand.  Do you have any service accounts with domain admin privileges?
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12184203
it was a pretty much a basic install.

I logged in as administraotr with the password I made.
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12191293
Ok we are getting there.... Please dont give up on me yet :)


I could not run regedit as some How I turned it off,

I obtaind a VBS script to change the Reg Key to allow me back in,.. the scrtip was as follows:

'Enable Registry Editing
'© Veegertx - 06/27/2003
'This code may be freely distributed/modified
On Error Resume Next
'Prevents errors from values that don't exist
Set WshShell = WScript.CreateObject("WScript.Shell")
'Delete DisableRegistryTools registry values

WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"
WshShell.RegDelete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools"

'display message
Message = "You should have access to Regedit now"

X = MsgBox(Message, vbOKOnly, "Done")
Set WshShell = Nothing
Set fso = Nothing

I am now able to run reg eddit,...  I followed this link provided by DVation191

http://support.microsoft.com/default.aspx?scid=kb;EN-US;256614

Adding that Dword key seems to have done something, now when I run  attrib  -r +s /s /d  this it is now taking a VERY LONG time to go through the files, and I can see them this time.. so it is TRYING now were as before it did nothing.

It now says Access Denied infront of each one though.

Any ideas on the next step?
0
 
LVL 2

Expert Comment

by:doswell
ID: 12202133
put on an anti-virus and run spyware removal tools.
that last command (if you're running it at c:\ )  
Will do more harm then good. it will remove read-only and apply system attributes to ALL folders/sub folders/everything from where you ran it.

What files are you trying to remove read-only on?
with the access denied, check what access is allowed on those files. if your account does show as having full access, and you get that error then there is something drastically wrong.
0
 
LVL 1

Author Comment

by:mrchaos101
ID: 12202191
Norton is on,

no need for spyware as the only sites the server has ever been on was to get drivers. It is a BETA box, from a fresh intall.

The files is the where our company DB files are located.

Im closing this tread I think.

I feel that DVation191  found the solution to the orignal qustion and that this is now leading into a new problem that would desirver to have it's own points.

DV's first link, showed and explained the problem I was having.
DV's second link was a repeat of another above.  That did not seem to help or do any thing for me.
Dv's Third link on the other hand is what I needed I belive.

I have started another thread on Default admin rights if any of you would like to follow.
http://www.experts-exchange.com/Networking/Q_21152681.html#12201925

Thanks all of you for your help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
FTP output from Wireshak 6 50
SCCM And Branchcache Server 1 35
Network Config 9 59
Firewall port opening 2 25
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now