techinfoBiT
  • News
  • Startups
  • Tech
    • Internet
    • Security
  • WebMaster
    • All
    • GEO
    • SEO
    • Server & Hosting
    • Tools
    • WordPress
    Why Your Business Emails Go to Spam: SPF, DKIM and DMARC Explained - techinfoBiT

    Why Your Business Emails Go to Spam: SPF, DKIM and DMARC Explained

    'Sorry, This File Type Is Not Permitted for Security Reasons' How To Fix This Error in WordPress Website Development-techinfoBiT

    ‘Sorry, This File Type Is Not Permitted for Security Reasons’ How To Fix This Error in WordPress

    What is DMARC Record in DNS and Why It is Important For Email Security-techinfoBiT

    What is DMARC Record in DNS and Why It is Important For Email Security?

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server - techinfoBiT-SHA-256,Ubuntu Server, Server Solution, Linux Hashing, File Integrity, Cryptographic Hash, sha256sum, Hash Generation

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024 - techinfoBiT

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024

    What is Google Analytics 4 and How to Setup GA4 for Websites - techinfoBiT

    What is Google Analytics 4 and How to Setup GA4 for Websites?

  • Science Space
  • Gadgets
    • Laptop & PCs
    • Mobile Phones
    • Wearables
  • More
    • How-To Guides
    • Reviews
    • Telecom
    • Applications
    • Press Release
No Result
View All Result
Services
techinfoBiT
  • News
  • Startups
  • Tech
    • Internet
    • Security
  • WebMaster
    • All
    • GEO
    • SEO
    • Server & Hosting
    • Tools
    • WordPress
    Why Your Business Emails Go to Spam: SPF, DKIM and DMARC Explained - techinfoBiT

    Why Your Business Emails Go to Spam: SPF, DKIM and DMARC Explained

    'Sorry, This File Type Is Not Permitted for Security Reasons' How To Fix This Error in WordPress Website Development-techinfoBiT

    ‘Sorry, This File Type Is Not Permitted for Security Reasons’ How To Fix This Error in WordPress

    What is DMARC Record in DNS and Why It is Important For Email Security-techinfoBiT

    What is DMARC Record in DNS and Why It is Important For Email Security?

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server - techinfoBiT-SHA-256,Ubuntu Server, Server Solution, Linux Hashing, File Integrity, Cryptographic Hash, sha256sum, Hash Generation

    How To Generate SHA-256 Hash From the Command Line on Ubuntu Server

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024 - techinfoBiT

    Cloudflare To Deprecate Auto Minify Feature On August 5, 2024

    What is Google Analytics 4 and How to Setup GA4 for Websites - techinfoBiT

    What is Google Analytics 4 and How to Setup GA4 for Websites?

  • Science Space
  • Gadgets
    • Laptop & PCs
    • Mobile Phones
    • Wearables
  • More
    • How-To Guides
    • Reviews
    • Telecom
    • Applications
    • Press Release
No Result
View All Result
techinfoBiT

How to Make File or Folder Immutable or Uneditable on Ubuntu Server

Nishant Kumar by Nishant Kumar
November 4, 2023
Reading Time: 3 mins read
Share on FacebookShare on Twitter > XShare via WhatsAppShare on LinkedIn

The file or folder on the server is the most important asset of any website or application; even a minute unintended change in a file or folder can result in making the website or application down. Every project contains some files or folder that needs even more attention, whether it is a configuration file in your home directory or a potentially vulnerable file or folder that needs additional care. The best way to prevent such files or folders is to make them immutable so that even the ‘root’ will have to make extra effort to edit/modify/delete them.

How to Make File or Folder Immutable or Uneditable on Ubuntu Server:

By changing the attributes you can easily make any file or folder immutable or uneditable, all you need is server SSH access. If you have SSH access then it can be done by running just a couple of commands. However, some files need to be updated and edited by the application or server tools to continue running the website or applications, even when you think that the specific file or folder is extremely critical you should not make them immutable unless you are sure about that it won’t affect the project. So make sure you test the website or application after adding or changing the attributes.

You might also like

How to Fix a FastAPI 502 Error Caused by a Missing Python Dependency - techinfoBiT

How to Fix a FastAPI 502 Error Caused by a Missing Python Dependency

June 17, 2026
Synology DS File Upload Reaches 100percent Then Fails? Failed to Upload Files on NAS - techinfoBiT

Synology DS File Upload Reaches 100% Then Fails? Failed to Upload Files on NAS

June 13, 2026

Follow these quick steps to make a file or folder immutable or uneditable on the Ubuntu server:

  • Login to your server using valid SSL credentials.
  • Navigate to the /directory where you have the file or folder you want to restrict.
  • Run the following command to make the file/folder immutable. Change the filename or folder name or their path with your target file or folder.
$ chattr +i filename or foldername
  • You can also use the direct path of the file and folder with the command as follows;
$ chattr +i /var/www/FolderName/MakeImmutable
$ chattr +i /var/www/FolderName/MakeImmutable.php
  • To check the attribute status, run the following command on your terminal;
$ lsattr filename or foldername
$ lsattr /var/www/FolderName/MakeImmutable.php
  • You should expect the output as follows, where the i tag represents it as immutable.
----i--------e-- filename

Once you run the command go back to the file using terminal or sFTP and try editing, renaming or deleting (be careful) the file or folder for which you just changed the attributes. It should show the permission denied error.

How to Remove the i Tag or Make File or Folder Editable Again?

Use the following command in the same way as the above process to remove the immutable attributes or i tag for a file or folder.

$ chattr -i filename or foldername

or

$ chattr -i /var/www/FolderName/MakeImmutable
$ chattr -i /var/www/FolderName/MakeImmutable.php

Additionally, you should have the proper file permission and ownership on all files and folders for better security and accessibility or performance of the website and application. We offer different digital solutions including services for server management and maintenance, you can reach out to us for professional support.

Tags: Change AttributechattrFolder ImmutableHow to BlogsMake File ImmutableMake File UneditableNginxServer AdminServer ManagementServer TutorialsUbuntu
ShareTweetSendShare
Previous Post

NASA Astronaut Frank Rubio Safely Returns to Earth, Spent 371 Days in Space

Next Post

The Ultimate Guide To Choosing the Right Career for You

Nishant Kumar

Nishant Kumar

Nishant is a passionate tech blogger and has been writing about technology since 2007. His insatiable love for gadgets has made him closely follow the advancements & innovations our society has made in terms of technology since a long while now. Nishant is a highly sought after reviewer with many manufacturers requesting his opinions about their products. He covers Mobile Phones, Gadgets, Tools and all kind of tech products to give consumers Genuine Reviews, Buying Guides and reliable news.

Related Articles

How to Fix a FastAPI 502 Error Caused by a Missing Python Dependency - techinfoBiT

How to Fix a FastAPI 502 Error Caused by a Missing Python Dependency

by Nishant Kumar
June 17, 2026
0

A 502 Bad Gateway is deceptive. The error shows up at the browser or API client, but the actual cause could be sitting anywhere: a crashed process, a misconfigured proxy,...

Synology DS File Upload Reaches 100percent Then Fails? Failed to Upload Files on NAS - techinfoBiT

Synology DS File Upload Reaches 100% Then Fails? Failed to Upload Files on NAS

by Nishant Kumar
June 13, 2026
0

Many Synology NAS users encounter a frustrating issue when uploading files via DS File. The upload appears to complete successfully, reaches 100%, enters the "Processing" stage, and then suddenly fails...

How to Install Let's Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Website - techinfoBiT

How to Install Let’s Encrypt SSL on Ubuntu 24.04 VPS, Free HTTPS for All Websites

by Nishant Kumar
June 3, 2026
0

One of the final and most important steps when launching a website or web application is enabling HTTPS. Whether you're hosting a WordPress website, a Spring Boot application, a Laravel...

How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS-techinfoBiT

How to Deploy a Spring Boot Application with PostgreSQL on Ubuntu 24.04 VPS

by Nishant Kumar
June 2, 2026
0

Deploying a Spring Boot application on a VPS involves more than simply uploading application files to a server. A production deployment typically includes a Java runtime, a PostgreSQL database, a...

Load More
Next Post
The Ultimate Guide To Choosing the Right Career for You - techinfoBiT

The Ultimate Guide To Choosing the Right Career for You

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

techinfoBiT | Startup & Tech News, Reviews | WebMaster, How-To Guides-Tech Blog-Startup Blog India

techinfoBiT is your go-to source for the latest startup & tech news, technology reviews; WebMaster, SEO tips and how-to guides to help you stay updated and navigate the digital world know more

  • About
  • Contacts
  • Disclaimer
  • Privacy Policy

© 2012-2025 techinfoBiT | All Rights Reserved

No Result
View All Result
  • News
  • Startups
  • Tech
  • WebMaster
  • Gadgets
  • How-To Guides
  • Science Space
  • Services

© 2012-2025 techinfoBiT | All Rights Reserved