How do I prevent a folder and file permissions from being changed?

Linode Staff

The permissions for a folder on my server keeps being changed. How can I prevent this from reoccurring?

1 Reply

You can set an immutable flag on the folder to prevent his from occurring. This also can be used on files too. here's an example of the command:

chattr +i folder_name
chattr +i file_name

To remove this flag, you can use the "-i" option:

chattr -i folder_name
chattr -i file_name

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct