FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Read only attribute cannot be removed for Folders in XP SP2





bukaida
Hi.... Can someone tell me how I remove the 'read-only' attribute for a folder? When I right click the folder to open up the 'Properties' box, even for an empty test folder I have just created, there is a green square in the 'read-only' box. I click it so that it is blank and click OK. If I then immediately re-open the Properties box, the green square is back again! Clicking on 'apply to all subfolders ...' makes no difference. Am I being dense somehow?! This doesn't apply to files, only folders, but it makes modifying files within that folder impossible. Can anyone help here?
billybob
A green square usually means that the option applies to one or more folders/files within that directory but not all of them.

So... If you make sure all the individual files/folders under that directory are not set I guess in theory it should go away.

if you are having problems editing files within a folder you may want to look at the ntfs permissions under the security tab...

whats the scenario are you trying to edit the files or is a program?
billybob
Another thing nearly forgot, if you dont have the security tab you may need to disable simple file sharing. In windows explorer go to tool>options>view> and un tick use simple file sharing (not 100% on the path Im not running xp atm).
FunDa
o
bukaida wrote:
Hi.... Can someone tell me how I remove the 'read-only' attribute for a folder? When I right click the folder to open up the 'Properties' box, even for an empty test folder I have just created, there is a green square in the 'read-only' box. I click it so that it is blank and click OK. If I then immediately re-open the Properties box, the green square is back again! Clicking on 'apply to all subfolders ...' makes no difference. Am I being dense somehow?! This doesn't apply to files, only folders, but it makes modifying files within that folder impossible. Can anyone help here?



Well, as BillyBib says
The green means that some of the files/folders inside that folder are read-only and preotected

try
My Computer > Tools > Folder Options > View> and untick "Use Simple Filesharing"

But my theory is that you have a hidden file in each folder that is read-only and system protected.
I can only think of a virus doing that, but it is unlikely that a virus will get into a test folder that you just created. Just check it out anyway.



Also make hidden and sytem files visible to see if there are any files inside it.

My Computer > Tools > Folder Options > View> "Show hidden files and folders"

If you really know what you are doing and promise not to delete any system files, also do My Computer > Tools > Folder Options > View > and untick "Hide protected operating system files"

See the folder properties, to see if there are any files inside that hidden folder.



Post here what happens. I don't have a definite answer for you question.
mOrpheuS
bukaida wrote:
When I right click the folder to open up the 'Properties' box, even for an empty test folder I have just created, there is a green square in the 'read-only' box. I click it so that it is blank and click OK. If I then immediately re-open the Properties box, the green square is back again!

You can't remove the read-only attribute from a folder, because it's not applicable !
Microsoft Support wrote:
Unlike the Read-only attribute for a file, the Read-only attribute for a folder is typically ignored by Windows, Windows components and accessories, and other programs. For example, you can delete, rename, and change a folder with the Read-only attribute by using Windows Explorer. The Read-only and System attributes is only used by Windows Explorer to determine whether the folder is a special folder, such as a system folder that has its view customized by Windows (for example, My Documents, Favorites, Fonts, Downloaded Program Files), or a folder that you customized by using the Customize tab of the folder's Properties dialog box. As a result, Windows Explorer does not allow you to view or change the Read-only or System attributes of folders.
...
This behavior is by design.
bukaida
I think morpheous has pointed out the fundamental problem i.e it cannot be removed. However I do not have any problem with the attribute as far as it is permitting me create a file from my php script inside that directory( say a backup.sql file for backing up current database). Unfotunately it is not permitting that. May be linux is somewhat more handy in this case.

BTW, none of the methods suggested by FunDa and Billybob worked. I have Kaspersky internet security 2010 installed with daily update. So donot have any virus problem till now.
mOrpheuS
bukaida wrote:
However I do not have any problem with the attribute as far as it is permitting me create a file from my php script inside that directory( say a backup.sql file for backing up current database). Unfotunately it is not permitting that.

That should not happen.

Can you post the relevant portion of your php code and the exact error message you're getting ?
bukaida
Sorry for late reply.
The scripts are

backup.php (worked only for the first time)
Code:

<?php
include 'connect.php';

$tableName  = 'jobdata';
$backupFile = 'myjobdata.sql';
$query      = "SELECT * INTO OUTFILE '$backupFile' FROM $tableName";
$result = mysql_query($query);
if($result)
{
   echo('<h2>Database Successfuly backed up.</h2>');
}
else
    {
      echo('<h2><font color="red">Database could not be backed up.</font></h2>');
   }

?>

and restore.php (never worked)

Code:

<?php
include 'connect.php';

$tableName  = 'jobdata';
$backupFile = 'c:/Program Files/MySQL/MySQL Server 5.0/data/association/myjobdata.sql';
$query      = "LOAD DATA INFILE 'backupFile' INTO TABLE $tableName";
$result = mysql_query($query);
if($result)
{
   echo('<h2>Database Successfuly Restored.</h2>');
}
else
    {
      echo('<h2><font color="red">Database could not be restored.</font></h2>');
   }

?>

The path where the backup file was created is
'c:/Program Files/MySQL/MySQL Server 5.0/data/association/myjobdata.sql'
and not under htdocs/project which is read only
bukaida
The backup problem is partialy solved by including
Code:

if(file_exists('c:/Program Files/MySQL/MySQL Server 5.0/data/association/myjobdata.sql'))
{
@unlink("c:/Program Files/MySQL/MySQL Server 5.0/data/association/myjobdata.sql");   
echo('<h2><font color="red">Old Backup found and deleted.</font></h2>');

   }


in backup.php

but I still cannot use the relative path and the current directory.
Related topics
Auto-Patcher Xp (Aug) Released
win xp sp2 crashes during recovery, can't be detected ..?
Simple steps to make windows xp bootable with sp2 integrated
Default icon in Windows XP
xp speed problems
This is how to make a Bluetooth headset work with XP SP2
Ill deal with your HijackThis logs for you.
firewall on Windows XP SP2
Windows XP SP3 comming soon
Windows xp on MAC
XP SP2 Firewall Disabled
Keyboard Language Problem with Windows XP SP2
UDF 1.50 read/write driver for Windows XP, please
Prevention, detection, and cure: 12 free security programs
Reply to topic    Frihost Forum Index -> Computers -> Computer Problems and Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.