Windows 10 read only black square

windows 10 does not allow me to remove the read only checkbox in the properties of a directory.

Hi guys; I am learning programming, and I have encountered a problem that is related to the operating system and not to the programming, just to put them in context:

to program in php using symfony v5.3; requires being able to put write permissions to a specific folder ...

the related directory is: C:\xampp\htdocs\dev\p1\paguelofacil/var/cache/dev

this directory exists; you have the necessary users and the users have the read and write permissions; the problem is that no matter how much I try to change the read-only check-box it persists ...

I have tried everything that this other post says and I have not found a solution; even I do not receive any errors ... and in the post I do mention if there is an error ...

Windows 10 not able to remove read only atttribute of the folders

even run the following command if no result ...

attrib -r C:\xampp\htdocs\dev\p1\paguelofacil\var\*.* /s

If more information is needed, do not hesitate to request it.

Windows 10 read only black square

Windows 10 read only black square

Windows 10 read only black square

Update:

To rule out that it is a user permissions problem or that it is a problem with the php script I have done the following:

  1. I have placed a patch (PHP) where I correct the write permission in the directory:
    echo 'Directory Exist '. $dir .'
'; echo get_current_user().'
'; echo substr(sprintf('%o', fileperms($dir)), -4).'
'; chmod ($dir, 755);

Output:

Windows 10 read only black square

result of this: solve the problem in a bad way ...

if the user does not have the necessary permissions; PHP would have thrown a fatal error! with this patch the error is removed but it is not the correct thing.

This is not correct because I should not change permissions from my code ... it is assumed that the permissions must be on the properties and attributes of the directory.

if I remove the patch then the error will come up again; this tells me that it does not matter if I put the attribute or permission; this is lost ...


Let's clarify the following: in order to create files (any format) within a directory, we programmers must validate that within that directory we can write ... in Linux the directory must have at least 755 permissions; so I ask you where I can do something similar with Windows?

when we validate a directory, with is_writable if the directory has permissions 0555 it will spit out a false (you cannot write to this directory); this permission is general; It is not associated with any user; In linux it is validated that the user / group is the owner of the directory too ... but I have already established this in windows it is assumed that by giving permissions to everyone, I am giving access to all users ...

Windows 10 read only black square

Windows 10 read only black square

Windows 10 read only black square

If your folder keeps reverting to read-only it could be due to a recent Windows 10 upgrade. Many users have reported that when upgrading their system to Windows 10, they encountered this error. Read-only is a file/folder attribute that lets only a specific group of users read or edit the files or folder. This can get infuriating, however, the fix is quite simple and easy but may differ depending on the scenario that caused it.

Generally, when you encounter such an issue, you can easily overcome it by unchecking the read-only attribute box found in the properties of the file/folder. However, this case is not that simple. You won’t be able to change the read-only attribute of the file/folder which gets annoying. Nevertheless, this article will teach you how to access your files/folders again — just follow through with the instructions.

Windows 10 read only black square
The folder reverts to read-only Windows 10

What causes the folder to revert to read-only on Windows 10?

This might be happening to you due to various reasons, nonetheless, the most generic ones are —

  • Windows upgrade. If you’ve recently upgraded your system to Windows 10, this might be occurring due to that as your account permissions may have been altered.
  • Account permissions. Sometimes, the error could be simply because of your account permissions which is the most common cause without you realizing it.

The possible and effective solutions for this problem are: –

Disable Controlled Access

Before we try other technical solutions, we will first try to disable the Controlled Folder Access in your settings. This is a hotfix and you may proceed with other solutions if this doesn’t work for you.

  1. Press and hold the “Windows Key + I” button to launch Windows Settings.
  2. Once the Settings are opened, navigate to Update & Security and then click on Windows Security.
  3. Now, under the Virus & threat protection settings, click on Manage settings.
    Windows 10 read only black square
    Virus & threat protection settings
  4. Under Controlled folder access, select Manage Controlled folder access and switch the access to Off.
    Windows 10 read only black square
    Manage Controlled folder access to Off
  5. Restart your computer completely and then check if the issue is resolved.

Log in as an Administrator

To start with the common mistake, if you have created multiple accounts on your system, make sure you are signed in as an administrator while accessing the file. The reason you are not able to read or edit the file/folder could be that the file/folder was created using an administrator account and you are trying to access it using a guest account or any other. Hence, before you move into the solutions mentioned below, make sure you are using the administrative account.

Change the Attribute of the Folder

If you are logged in as an administrator and still unable to access the files, then in such a case, you’ll have to change the attribute of the file using the command prompt. To do this, follow the given instructions:

  1. Press Winkey + X and select Command Prompt (Admin) from the list.
  2. To remove the read-only attribute and set a new attribute, use the following command:
    Windows 10 read only black square
    Enter the command to remove Read-only Attribute
attrib -r +s drive:\\
  1. The above command will remove the read-only attribute of the file and change it to a system attribute. However, some files/folders do not operate properly in the system attribute so use the following command if you want to remove the system attribute:
attrib -r -s drive:\\

Change Permissions of the Drive

If you are facing this issue after upgrading your system to Windows 10, then changing the permissions of the drive could fix your problem. There have been several reports according to which the issue has been solved via this method. Here’s how to do it:

  1. Right-click on the drive where your files/folders are located.
  2. Select Properties.
  3. Navigate to the Security tab.
    Windows 10 read only black square
    Local Disk Properties (Security)
  4. Click Advanced and then select Change Permissions.
    Windows 10 read only black square
    Select change permissions
  5. Highlight your user and then click Edit.
    Windows 10 read only black square
    Highlight your user and click Edit
  6. Select This folder, subfolders, and files from the drop-down list.
  7. Check the Full Control box under Basic Permissions.
    Windows 10 read only black square
    Check the Full Control Box
  8. Click OK.

If you have more than one account on the system, then you’ll have to enable inheritance first. Here’s how to do it:

  1. Go to your System drive (where your Windows is installed).
  2. Go to the Users folder.
  3. Right-click on your username and click Properties.
  4. In the Security tab, click Advanced.
  5. Hit Enable Inheritance.
    Windows 10 read only black square
    Highlight your user and click Enable Inheritance

Disable your Third-party antivirus

If the error persists whenever your system restarts, it could be due to your third-party antivirus software. Your antivirus might be detecting the files as a threat and consequently, stopping you from accessing them. In such a case, you’ll have to disable your antivirus software, change the attributes of the files/folders as mentioned above and restart your system to see if the files/folders still revert to read-only. If they don’t, this means your antivirus is causing the issue and you should probably uninstall it.

Windows 10 read only black square

Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

What does box in read only mean?

“Read-Only" access to Box content restricts editing; however, it allows users to view files and folders; change names, permissions, and collaboration settings; and reorganize files and folders, including new folder creation. Users with "Read-Only" Box access may also download or delete content.

What does a black box around a folder mean?

However, when the users opt to have Large or extra-large icons, they have noticed a black background around the folder. This is a bug in Windows. It is seen because of some graphical glitch in the system due to corrupt Icon Cache or System Files in the system.

How do I remove the Read Only attribute from a folder in Windows 10?

I suggest you to follow the steps provided below and check if it helps..
Right click on the file/folder or drive..
Select Properties..
Go to security tab..
Select the user name..
Click on Edit button..
Under permission to Authenticated user, check on full control..
Click on Apply and OK button..

How do I permanently delete a read only folder?

Read-only Files.
Open Windows Explorer and navigate to the file you want to edit..
Right-click the file name and select "Properties.".
Select the "General" tab and clear the "Read-only" check box to remove the read-only attribute or select the check the box to set it. Click "OK" to save your changes..