Linked Questions

8
votes
5answers
16k 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 ...
17
votes
1answer
47k 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?
0
votes
2answers
2k 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
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
1answer
61 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
1answer
41 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, ...
52
votes
3answers
15k 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 ...
6
votes
1answer
44k 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 ...
12
votes
1answer
23k 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),...
1
vote
3answers
1k 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
1answer
941 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
2answers
92 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
0answers
48 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 ...