Tagged Questions
0
votes
2answers
51 views
why am I able to delete file which belongs to `root` under a non-root user? [duplicate]
I create a file under my user esolve
and then su root
and use chown to change its user to root
then I returned to user esolve
I notice I can still delete the file with rm
why?
2
votes
1answer
89 views
“rm -rf Filename.iso ” Permission denied
Hi I am facing an issue while deleting an .iso file from Linux x86_64 GNU/Linux.
Here are the permissions for the file:
# ls -lrt
-rwxrwxr-x 1 dev devgrp 2687934464 Apr 12 14:13 ...
1
vote
1answer
36 views
Able to delete file without permission [duplicate]
I've been experimenting with file permissions and ownership lately, and I tried this:
touch a
sudo chown root:root a
sudo chmod 000 a
I can't read, write, or execute the file, but I can still ...
24
votes
2answers
4k views
Why can rm remove read-only files?
If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?
If I do this:
echo test > test.txt
chmod 444 test.txt
rm test.txt
...rm will ask if I want to ...
0
votes
1answer
322 views
OSX : rmdir “permission denied” but directory removed
This is a question from a newbie trying to learn UNIX commands.
I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on ...
4
votes
2answers
333 views
Protect files from `rm -f`
Much to my immediate chagrin, removing write protections on a file do not seem to protect it from rm -f.
touch foo
chmod a-w foo
rm -f foo
How can I protect a file from accidental deletion when rm ...
3
votes
1answer
1k views
mv file without write permission to the source file
I just realised that I can move a file that I do not own and don't have write permissions on. I have write permissions to the directory, so I am guessing that is why I could move it, but in this ...
5
votes
1answer
2k views
Unable to delete file, even when running as root
I am in the process of migrating a machine from RHEL 4 to 5. Rather than actually do an upgrade we have created a new VM (both machines are in a cloud) and I am in the process of copying across data ...
3
votes
1answer
451 views
Prevent a subdirectory from getting deleted / enforce a directory structure
imagine the following folder structure
../documents
../documents/templates
I have two user groups:
editors
managers
Users of both groups should be able to
create new files
modify any ...
11
votes
3answers
1k views
Is there any way to prevent deletion of certain files from user owned directory?
Let's say user has Directory1 and it contains File1 File2 CantBeDeletedFile
How to make so the user would never be allowed to delete the CantBeDeletedFile?
If I change the ownership of Directory1 and ...
5
votes
1answer
1k views
I can't remove a directory tree with rm -rf
This seems very strange to me. I'm running kernel 2.6.37.2 and ran:
~]$ cp -r /proc/ here
~]$ rm -rf here
I get some permission denies when copying as expected and I eventually hit Control-C. I get ...
4
votes
3answers
250 views
Give a warning when something is about to be deleted (by root)
I know that root can do anything, but is there a way to at least alert root that they are about to delete a folder that perhaps shouldn't be deleted?
We keep a work directory in our /tmp folder, and ...
