In some situations, you will have problems deleting a file from your PC or Mac computer because that file will be configured as "Read Only". By changing the attributes of the file, you can very easily delete "Read-only" files under Windows or Mac OSX.
Method 1 of 4: Use the Properties menu to remove the Read-only attribute
Step 1. Right click on the file in Windows Explorer
Step 2. Click Properties from the drop-down menu
Step 3. Uncheck the box next to the "Read only" option in the "Properties" menu
- If the box is checked and grayed out, it means either the file is in use, or you do not have permission to edit it.
- Close all programs that are using the file. If necessary, log in as administrator to get permission to edit the file.
Step 4. Delete the file
Method 2 of 4: Use the Attrib command to turn off the Read-only attribute
Step 1. Click on the Start menu and then click on Run
If you don't see the "Run" command, click All the programs > Accessories > Execute.
Step 2. Remove the "Read-only" attribute and set the "System" attribute
Type the following command:
- attrib -r + s drive: \
- For example, for a folder called "test", type attrib -r + s c: \ test
Step 3. Delete the file
Method 3 of 4: Delete Read-Only Files in Mac OS X Using Finder
Step 1. Open Finder
Find the file you want to delete and click on it.
Step 2. Click File at the top of the Finder menu, then click Read the information.
Step 3. Choose the "Privilege" option in the "Sharing and permission" section
Step 4. Click the box next to “Owner”
Step 5. Set the file state to "Read & Write"
Step 6. Delete the file
Method 4 of 4: Delete Read-Only Files in Mac OS X Using Terminal
Step 1. Click on Application > Utilities > Terminal.
Step 2. Type "cd"
For example, if you want to configure permissions for a file in your Documents, type "cd Documents".
Step 3. Enter the command “ls –l” to view the contents of the folder in detail
Permissions are displayed in the far left column.
Step 4. Type "chmod u + rwx" filename "" to allow read, write and execute rights
Close the Terminal.
Step 5. Find the file and delete it
- In Mac OS X, you can set permissions for an entire group of files. "Read-only" files can be edited and deleted by other users on your network if you give them permission.
- If you still cannot delete a "Read-only" file on your Windows computer, try utilities such as MoveOnBoot, Delete FXP Files, Delinvfile, or Unlocker.