4
votes
5answers
270 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 ...
-2
votes
3answers
493 views

How do I override rw-r--r— root/wheel for a all files in a directory?

I am trying to delete a directory on OS X. I do rm -r /path/dir but I keep getting many, many messages like this: override rw-r--r-- root/wheel for cron/migrate.php? I type y for one message, ...
3
votes
2answers
112 views

What is a regular file?

$ rm foobar rm: remove regular file `foobar'? What does it mean for a file to be "regular" and why does rm treat such a file as a special case?
1
vote
2answers
131 views

What's the idea behind rm not removing non-writable file by default?

What's the idea behind rm not removing non-writable file by default? Every time you want to remove a file that is non-writable file for current user but you have a write permission on directory get ...
1
vote
1answer
457 views

mount.cifs not respecting file permissions in Ubuntu 12.04.2 LTS

I am attempting to mount a cifs drive in standard Ubuntu 12.04.2 LTS using the following line in /etc/fstab: //server-name/share-name /mnt/archive cifs ...
1
vote
1answer
376 views

I can't seem to remove a file even after changing ownership and permissions [duplicate]

Haven't been here much. Mostly Stackoverflow. Anyway, I have a file that I can't remove. I tried sudo rm files.db and got Operation not permitted Did sudo chown me: files.db Then sudo chmod 777 ...
6
votes
5answers
454 views

Making a directory protected from 'rm -rf'

I just lost some data in folder A which was inside folder B after doing rm -rf B. Before I could realize what have I done, it was all over. Now a lesson is learnt, I wish to make some of my folder ...
1
vote
2answers
228 views

Cannot remove /log/var/snort as root

I am using Ubuntu 11.10 Gnome. I uninstalled snort in order to install a more recent version. The new installation initially failed because the system would not let be rm or modify /var/log/snort ...
0
votes
1answer
62 views

Not able to remove a file [duplicate]

file name : abc permissions : -rwxrwxrwx shell : ksh I am logged with the user which is the owner of this file. Contents of file AccessTime = 20130424-161120 ActualShmKeyDec = 1090650862 ...
0
votes
2answers
126 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
481 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
104 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 ...
6
votes
1answer
3k 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) ...
30
votes
2answers
10k 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
478 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 ...
5
votes
2answers
624 views

Protect files from `rm -f`

Much to my immediate chagrin, removing write permission 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 ...
5
votes
1answer
2k 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 ...
7
votes
1answer
5k 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
803 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 ...
14
votes
3answers
4k 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
2k 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
272 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 ...