The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To change a basic attribute on one Windows file, right-click it, choose Properties, and use the options on the General tab; for command-line or bulk changes, use attrib. On macOS and Linux, “file attributes” can mean permissions, ownership, flags or metadata, so first identify what you want to change. A Hidden or Read-only flag is not the same as an access permission.
First identify what you want to change
“File attributes” is an umbrella term, not one universal setting. Windows has named attributes such as Hidden and Read-only. macOS and Linux distinguish access permissions and ownership from filesystem flags and extended attributes.
| Goal | What to change |
|---|---|
| Hide an item from ordinary browsing | Windows Hidden attribute; a hidden flag or filename convention on macOS/Linux. |
| Limit who can read, edit or run a file | Access permissions or access-control lists (ACLs), not merely a Hidden or Read-only marker. |
| Change who owns it | Ownership settings or commands such as chown. |
| Make a script runnable | Unix execute permission, usually chmod +x. |
| Prevent changes with an immutable state | A platform or filesystem flag, such as macOS uchg or a supported Linux chattr flag. |
| Change application or system metadata | Extended attributes, such as macOS xattr or Linux setfattr. |
| Stop Windows search indexing | The Windows Not Content Indexed attribute, where supported. |
Windows Read-only is a flag that applications may honor; it is not a security boundary. Removing it does not grant write permission, and granting permission does not necessarily clear it. Similarly, “read-only” can mean a permission, an immutable state, or a volume mounted read-only. Those require different remedies.
Recommended Free Tools
Change attributes in Windows File Explorer
- Select the file or folder, right-click it and choose Properties.
- On the General tab, change an available option such as Read-only or Hidden.
- Select Apply. If it is a folder, choose whether to apply the change to the folder only or to the folder, subfolders and files; then select OK.
The controls shown depend on the item, location, filesystem, permissions and whether it is managed by a network, cloud-sync or other application. Explorer does not expose every possible Windows attribute.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Setting Hidden does not make a file private or protected. To see hidden items in Windows 11, open File Explorer and select View → Show → Hidden items. In Windows 10, use View → Options → View → Show hidden files, folders, and drives. If the item is still absent, verify its location and permissions as well.
Use Command Prompt for Windows attributes
The attrib command displays or changes Windows file attributes. Use + to set a flag and - to clear it. Quote a path if it contains spaces.
attrib "C:UsersNameDocumentsreport.docx"
attrib +r "C:UsersNameDocumentsreport.docx"
attrib -r "C:UsersNameDocumentsreport.docx"
attrib +h "C:UsersNameDocumentssecret.txt"
attrib -h "C:UsersNameDocumentssecret.txt"
Common flags include:
| Flag | Meaning |
|---|---|
r |
Read-only |
h |
Hidden |
s |
System |
a |
Archive, used in backup workflows to indicate changed files; it does not create an archive. |
i |
Not Content Indexed |
p / u |
Pinned / unpinned storage states, not privacy controls. |
To include matching files in subdirectories, use /s; add /d to include directories. For example:
attrib -r "C:UsersNameDocumentsFolder*.*" /s /d
Use recursive wildcards only when you intend to affect the entire tree. This command, for example, clears Hidden and System on matching files and directories throughout the tree:
attrib -h -s "C:SomeFolder*.*" /s /d
Check the target path before running a recursive command. System or Hidden status may need to be cleared before other attributes can be changed. To act on a symbolic link instead of its target, use /l. Microsoft documents these switches, wildcard behavior and attributes in its attrib reference.
Verify the result by running attrib "C:Pathfile.ext". Letters such as R, H, S and A indicate the corresponding attributes that are set.
Use PowerShell without overwriting other flags
PowerShell exposes .NET file attributes through an item’s Attributes property. Inspect the current value first:
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
(Get-Item "C:Pathfile.txt").Attributes
To set or clear Hidden while preserving other existing flags, use bitwise operations:
$file = Get-Item "C:Pathfile.txt"
$file.Attributes = $file.Attributes -bor [System.IO.FileAttributes]::Hidden
$file = Get-Item "C:Pathfile.txt"
$file.Attributes = $file.Attributes -band (-bnot [System.IO.FileAttributes]::Hidden)
For Read-only, use the dedicated property:
$file = Get-Item "C:Pathfile.txt"
$file.IsReadOnly = $true # Set Read-only
$file.IsReadOnly = $false # Clear Read-only
Assigning a replacement value directly to .Attributes can discard other flags. The bitwise examples change only the specified flag. For a bulk operation, test the command on one known file first and check the selected paths before extending it to many items.
Change Windows permissions instead of attributes
If an application reports “Access denied” or still cannot save after you clear Read-only, check Properties → Security. NTFS permissions and ACLs govern access; attrib -r does not grant permission. Conversely, a user with write permission may still encounter an application that honors the Read-only flag.
Use an elevated shell only when you have a legitimate reason and understand which item you are changing. Elevation will not fix every problem, such as a read-only volume, a file held open by another process, encryption or enterprise policy.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Change file settings on macOS
Use Finder for permissions and the Locked control
- Select the item in Finder and choose File → Get Info.
- Expand Sharing & Permissions. If necessary, click the lock and authenticate.
- Select a user or group and choose a privilege such as Read & Write, Read only, Write only or No Access.
- For a folder, use Apply to enclosed items only if you intend to propagate the permissions.
The Get Info window may also show a Locked control. Do not assume this is interchangeable with a particular permission bit: inspect the state that is actually preventing the operation. Apple’s Finder permissions guide explains the workflow.
Use Terminal for permissions, flags and metadata
chmod changes Unix permissions; chflags changes BSD flags. For example:
chmod u+w "/path/to/file" # Add write permission for the owner
chmod u-w "/path/to/file" # Remove write permission for the owner
chmod 644 "/path/to/file" # Owner read/write; others read
chmod 755 "/path/to/script" # Owner read/write/execute; others read/execute
chflags hidden "/path/to/file"
chflags nohidden "/path/to/file"
xattr -l "/path/to/file"
xattr -d com.apple.quarantine "/path/to/file"
Removing the quarantine extended attribute can affect a security warning or protection. Do so only if you understand why the file was quarantined and trust its source; it is not a general way to make a file editable.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
A filename starting with a dot, such as .config, is conventionally hidden in Unix-like environments. That naming convention is distinct from the macOS Hidden flag. To inspect permissions, ACL indicators, BSD flags and extended-attribute indicators, run:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsls -lOe@ "/path/to/file"
macOS access can also be limited by privacy controls or system protections even when visible permissions appear to allow it. Apple describes the platform’s file attributes, permissions and flags in its File System Programming Guide.
Change file settings on Linux
Linux uses separate tools for permissions, ownership, filesystem flags and extended attributes. Which flags are available depends on the filesystem, kernel and privileges.
Permissions and ownership
ls -l "/path/to/file"
chmod u+rwx,go+rx "/path/to/file"
chmod 644 "/path/to/file"
chmod 755 "/path/to/script"
sudo chown user:group "/path/to/file"
sudo chown "$USER":"$(id -gn)" "/path/to/file"
The symbolic example gives the owner read, write and execute access, and gives the group and others read and execute access. Numeric modes such as 644 and 755 set the permissions explicitly; choose one appropriate to the file rather than copying a mode blindly. To make a script executable without replacing its other permission bits, use chmod +x "/path/to/script".
Avoid chmod -R 777 as a generic fix. It grants broad access, can expose data, and will not resolve the wrong owner, an ACL, immutable flag or read-only mount.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Filesystem flags and extended attributes
Use lsattr to inspect supported filesystem flags. On a filesystem that supports it, the immutable flag can be set or cleared with chattr:
lsattr "/path/to/file"
sudo chattr +i "/path/to/file" # Set immutable
sudo chattr -i "/path/to/file" # Clear immutable
Use immutable status carefully: while set, it can prevent ordinary modification or deletion. Not every filesystem supports every chattr flag. See the chattr reference.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Extended attributes are named metadata, not read/write/execute permissions. View and change them with getfattr and setfattr:
getfattr -d "/path/to/file"
setfattr -n user.label -v "example" "/path/to/file"
setfattr -x user.label "/path/to/file"
These commands require the relevant tools and filesystem support. The setfattr reference describes extended-attribute operations.
Most Linux desktop environments treat dot-prefixed names as hidden; there is no single portable Hidden attribute that works the same across all Linux desktops and filesystems.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot a change that did not work
- Inspect the state again. On Windows, run
attrib "C:Pathfile.ext"or inspect PowerShell’s.Attributes. On macOS, usels -lOe@; on Linux, usels -l,lsattrand, if relevant,getfattr -d. - Check the right mechanism. A Windows Read-only flag is not an NTFS permission. On macOS/Linux,
chmoddoes not clear an immutable flag. A macOS Locked control, Unix permissions and BSD flags are not interchangeable. - Check ownership and effective access. The file may belong to another user, or an ACL may affect access beyond what a simple permissions display suggests.
- Check the volume and location. A read-only mounted volume cannot be fixed by changing an individual file. Removable drives, network shares and filesystems such as FAT/exFAT may not preserve or support all metadata.
- Check for a process or service using the file. An open handle, antivirus, security software, enterprise policy, cloud synchronization or a provider-controlled placeholder can block or change an operation.
- Check platform protections. macOS privacy controls and System Integrity Protection may prevent changes. On Linux, a filesystem may not support a requested
chattrflag. - Use elevation only when appropriate. Administrator or
sudoaccess may be required for ownership or protected-file changes, but it does not override every storage, encryption or system-protection restriction.
If using WSL, identify whether the item is in the Linux distribution’s filesystem or on a mounted Windows drive. Metadata behavior differs between the two. Microsoft warns against using Windows applications or tools to modify files inside the Linux filesystem root because Linux permissions, ownership and timestamps can be damaged or lost. See Microsoft’s WSL file-permissions guidance and warning about Windows tools and Linux files.
Undo a change safely
Reverse the specific change you made rather than resetting every attribute. For example:
attrib +h "C:Pathfile.txt" & rem hide it again
attrib -h "C:Pathfile.txt" & rem show it again
chflags hidden "/path/to/file" # Hide on macOS
chflags nohidden "/path/to/file" # Unhide on macOS
sudo chattr +i "/path/to/file" # Set Linux immutable flag
sudo chattr -i "/path/to/file" # Clear Linux immutable flag
For permissions, restore the original mode or privilege setting if you recorded it. Guessing a replacement mode can grant too much or remove access someone needs. When copying or moving files, attributes and metadata may be preserved, translated or discarded depending on the source and destination filesystems, archive tool, network share or cloud service.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Sources and platform scope
Windows attrib syntax and flags are documented for Windows 10, Windows 11 and supported Windows Server versions in Microsoft’s command reference. Windows 10 reached end of support on October 14, 2025, but the basic attribute procedures described here are not limited to a particular Windows 10 build. See Microsoft’s hidden-file settings guidance for the alternate Explorer path. GNU documents chmod as a permissions tool in its Coreutils manual.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

