Linked Questions
15 questions linked to/from Why can rm remove read-only files?
8
votes
5
answers
19k
views
logic behind deleting files where user does not have right to write [duplicate]
When I create a file with no write permissions in my home directory:
$ umask 777; touch testfile
$ ls -ln testfile
---------- 1 1000 1000 0 2014-03-21 16:52 testfile
$
..then I'm still easily able ...
22
votes
1
answer
66k
views
Minimum file permissions to delete a file [duplicate]
To delete a file in Linux:
What minimal permissions do we need to set on it?
What minimal permissions do we need to set on its parent directory?
2
votes
2
answers
4k
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
1
answer
2k
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 delete ...
0
votes
1
answer
541
views
Why can't i delete file when i have the file's ownership? [duplicate]
As a root user, I created a file in / directory. I can only read this file when logged in as normal user (say A) as expected.I changed the ownership to A.Now A can read as well as write.But when I try ...
0
votes
0
answers
1k
views
how does the cp - f work in Unix? [duplicate]
I was reading about the cp command in unix and one of the options is:
cp -f : force copy by removing the destination file if needed
so I wanted to test this to see how it works, I did the following:
...
0
votes
1
answer
565
views
Can a user without u-permissions, read, change permission and the delete the file and why? [duplicate]
So I made a file and gave it the following permissions.
chmod u-rwx, g=rw, o=rx file
The user can't read the file now, because he doesn't have any read permissions, right?
I could remove the file, ...
0
votes
0
answers
40
views
Deleting read-only directory on linux? [duplicate]
I created an empty read-only directory:
mkdir -m 400 ~/Desktop/hello
As per the octal permission, it indicates the directory has read only permission.
But contrast to that when I am using the ...
53
votes
3
answers
21k
views
Why is rm allowed to delete a file under ownership of a different user?
From the post Why can rm remove read-only files? I understand that rm just needs write permission on directory to remove the file. But I find it hard to digest the behaviour where we can easily delete ...
8
votes
1
answer
88k
views
Move preserves ownership of source files not allowing writes
Kindly Consider:
$ id # Me
uid=100(user1) gid=200(group1) groups=200(group1)
$ ls -l tnsnames.ora # So user1 has only read permission on below file.
-rw-rw-r-- 1 oracle dba 411024 Jul 28 2010 ...
14
votes
1
answer
29k
views
Cannot delete a file - permission denied - why?
[db2inst1][testing ~/sqllib/db2dump] rm db2diag.log
rm: cannot remove `db2diag.log': Permission denied
[db2inst1][testing ~/sqllib/db2dump] id
uid=1002(db2inst1) gid=107(db2iadm1) groups=16(dialout),...
2
votes
3
answers
15k
views
rm prompt when deleting unwritable files
This is about GNU rm. The info page says:
Otherwise, if a file is unwritable, standard input is a terminal, and the -f or --force option is not given, or the -i or --interactive=always option is ...
3
votes
1
answer
1k
views
What does it mean if a directory has only x (executable) permission for certain user/group?
I stumbled across the directory /etc/ssl/private on Ubuntu (12.04), it has following permission:
drwx--x--- 2 root ssl-cert 4096 7月 8 2012 private/
I wonder what does this mean for group ssl-...
1
vote
2
answers
756
views
Can someone delete my non-empty directory from a write-all directory without having write permissions on it?
I know that deleting a file depends on the permissions I have on the enclosing directory, and not on the file itself, see e.g. here
But what about a non-empty directory? Using rm -rf NON_EMPTY_DIR ...
1
vote
0
answers
113
views
Prevent specific user from altering file they own through directory traversal in shared folder to which they have no write permissions(scenario)?
Bob is the sysadmin.
Alice is a user, and boy is she a mess.
Bob has set up a shared folder, say /srv/share, with permissions of 775 and ownership belonging to bob:usershares.
Alice is not a part ...