Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't clear read-only attribute in XP, no matter what

Status
Not open for further replies.

usarmycwo

Technical User
May 28, 2005
7
US
Have just discovered this great website. If you guys can't help, no one can.

And so far, none of the solutions I've seen here or elsewhere has worked for me.

Before deploying to Afghanistan last year, I backed up all my data to two CDs, then deleted all the data from our home computer just in case the house was burgled while wife was at work.

While gone, wife had problem with the computer. Friend loaned us a spare computer with XP. What a difference in speed, especially during bootup. So when I returned I started fresh, reformatting the hard drive and installing XP w/SP2. Works great.

Except that the files I put back onto the computer from the CDs are marked read only.

Now we all know why that is, and we know all you have to do is uncheck the box. To make it better, we can tell Windows to also reset the subfolders.

As we also know, it doesn't work, whether tried as user or administrator. Googling this problem shows it's a common one.

Microsoft's solution is to use the old attrib command to reset the read-only attribute. It doesn't work, either. I'm comfortable enough with DOS to know I was doing it right. Also, another post found on Google said it didn't work for him either.

I found a folder on my drive with only a few .doc files and checked them one by one. None of them was marked read-only, yet the folder was.

So why does this matter?

Because when I try to edit my personal website with FrontPage, I get this: Server error, cannot open file "service.lck" for writing.

I get the error only when I'm logged in as user. When logged in as administrator, no error message. Googling the error message is what led me to the read-only solution.

But I don't want to be connected to the Internet when logged in as administrator. (Paranoia? Yes.) So I've got to edit the website as administrator, switch over to user, log on to the Internet (dial-up, no less), publish the changes, find a change didn't work well, switch back as administrator, fiddle with it, switch back to user, log back on the internet, see what it looks like ... ad nauseum.

It appears that read-only attribute is a "feature" of Win XP, and is unfixable. Or is it?

Or is the service.lck error message fixable another way?
 
Under XP the read-only attribute for folders loses its meaning. (It is essentially an OS flag to read or not to read a desktop.ini file for the folder.).

Read only can be changed for files, but not persistently for folders (because a folder customization may subsequently be applied):
In a practical sense, this should not matter to the user. One does not after all write to folders, but to files. And the fact that the folder has a read-only attribute set has nothing important to say about the attributes set on the files contained in the folder itself.
 
I get the error only when I'm logged in as user. When logged in as administrator, no error message."

Have you tried giving users write permissions to the files?

You receive a " Cannot open file ...\_vti_pvt\service.lck for writing" error message when you attempt to save changes to a Web in FrontPage 2000

Cannot Open Service.lck for Writing or Reading


ArcSet. (freeware)

"If you ever copied files from a CD-ROM to your hard drive, you've probably noticed that those files will be set to read-only, preventing you from modifying them. Removing the read-only attribute by hand can get really tedious, especially if you're looking at hundreds or thousands of files. ArcSet is a utility that does the job for you. It can automatically reset file attributes on specified files on a drive or in a folder, even recursing through subfolders."



Cannot Change the Read-Only Attribute of System Folders


HOW TO: Remove the Read-Only Attribute While You Copy Files from a CD-ROM in Windows 2000 (Q323002)



 
First, thanks to all who tried to help.

But --

bcastner, you say the read-only attribute doesn't matter in XP. I guess you're right, even though Microsoft says it's the cause of the .lck error message. [You receive a "Cannot open file ...\_vti_pvt\service.lck for writing" error message when you attempt to save changes to a Web in FrontPage 2000 ]

linney, I downloaded and installed Arcset. Ran it on the folder with my websites. No help, the read-only box remained checked. Must be something about XP keeping that attribute set, no matter what.

You suggest giving Steve/user write permissions to the files. Confess I can't find how to do that. I should be able to go to the folder or file, right click, hit Properties, then find Security, and add any write/read/modify, etc, permissions. (I can visualize the screen from Win 2000.) But this screen is not showing up on my computer. I don't see a Security tab at all. Clicking Advanced lets me archive or index, compress or encrypt.

Any more ideas?

-- Steve
 
[/quote]CAUSE
This behavior occurs if the Web was copied from CD-ROM so that all .lck files were marked as read-only.[/quote]

These are file and not folder attributes being discussed in the MS KB article you cite.

 
In Windows XP, you can apply permissions to files or folders that are located on NTFS file system volumes.

By default, simplified sharing is enabled in Windows XP if you are not connected to a domain, which means that the Security tab and advanced options for permissions are not available.


To see the Security Tab in XP.

Click Start, and then click Control Panel.
Click Appearance and Themes, and then click Folder Options.
Click the View tab, and then click to clear the Use simple file sharing [Recommended] check box in the Advanced settings box.

It is also available from Safe Mode at all times.

HOW TO: Set, View, Change, or Remove File and Folder Permissions in Windows XP
 
linney, your advice and the MS link seem to be right on target. Can't wait to try them. Many thanks.

In the meantime, I've bit the bullet and have been using my admin account to both edit my website (while disconnected fron the Internet, easy when you're on dial-up) and to publish it. Then I hurry to disconnect again. Believe it's something I can learn to live with.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top