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.
8
questions
0
votes
0
answers
22
views
Permission denied after chattr use [duplicate]
tried chattr on a file but can't revert it's effect.
currently it looks like
lsattr /path/myfile
--------------e----- /path/myfile
ls -la /path/myfile
-rwxr-xr-x 1 root root 0 Jul 5 11:12 /pat/myfile
...
0
votes
1
answer
351
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
1
answer
290
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 (...
2
votes
1
answer
2k
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
3
answers
1k
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
3
answers
342
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
2
answers
4k
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 ...
21
votes
1
answer
7k
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?