The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [chattr]

chattr is a Linux command-line tool to change file attributes on a Linux ext2/3/4 file system, e.g. to make files immutable or append-only even for the root user.

Filter by
Sorted by
Tagged with
0
votes
1answer
73 views

Why does `chattr +e <file>` fail with no space left on the device when there's plenty?

I have a problem. chattr +e <file> does not work, if the file does not have the +e attr set on it, or if it's removed and re-added. [root@ip-203-0-113-13 log]# df -Th Filesystem Type ...
-1
votes
1answer
207 views

Why is 'chattr' on CentOS 6 returning 'Killed'? [closed]

Why is 'chattr' on CentOS 6 returning 'Killed'? # chattr -i /usr/sbin Killed # file /usr/bin/chattr /usr/bin/chattr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linker (...
0
votes
1answer
623 views

Prevent deletion of folder but let access to everything inside of it

I know there is the +i flag for files and directories, but i have a deeper Problem. Is there a way to prevent a folder from being deleted by an User which should be able to create / access / remove ...
5
votes
3answers
641 views

Can I simulate an S3 bucket going down when it is accessible to root user?

I'm trying to test new network monitoring code for an application that runs on a Debian appliance. I am currently tasked with ensuring that an SNMP trap is thrown when external network shares (such as ...
0
votes
3answers
189 views

Why dir contents get deleted with chattr +a?

On an ext4 filesystem, I have a base dir which itself has three dirs a, b and c, and each dir has various contents inside. I set chattr +a base and then executed rm -r base. Then I found a, b, c ...
0
votes
2answers
2k views

Stop file being deleted on NFS mount

I have files stored on an NFS mount which I want to prevent being deleted. The use case is I have a demo version of a web application which uses the same images on every demo - when someone deletes a ...
11
votes
1answer
3k views

Linux: How can I view a file's attributes which I set using `chattr`?

I have a file, which I wanted to protect from accidental deletion, so I've ran: chattr +i filename Now my question is, once I've changed a file attributes, where can I see the newly set attributes?