3
votes
2answers
171 views

Deleted /tmp accidently

Accidently, I ran sudo rm -r /tmp, is that a problem ? I recreated it using sudo mkdir /tmp, does that fix the problem ? After I recreated the directory, In the places section in the sidebar in ...
3
votes
2answers
80 views

Cannot delete File on Fedora

I have a file with following permission: -rwSr-s---. 1 1634630331 1818884080 118784 Jun 29 1970 DailyUpdateClass.class If I try to delete this file with root login, I get error. rm: cannot remove ...
0
votes
1answer
62 views

How do I delete a file in a read-only directory?

I've got a directory and a file in it, with the directory marked as read-only: $ mkdir directoryname $ touch directoryname/filename $ chmod a-w directoryname I cannot delete the file, even if pass ...
5
votes
1answer
345 views

Give user permission to rm without password or sudo

I'm trying to give the ubuntu user on my machine the ability to rm folders and files (mainly in the /www/ folder) without the need to invoke a password or the need to use sudo. I've been following ...
1
vote
1answer
66 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?
4
votes
5answers
799 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 ...
-1
votes
3answers
2k 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
639 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
825 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
865 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
1k 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
807 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
343 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
72 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
274 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
724 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
142 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
6k 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) ...
33
votes
2answers
15k 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
601 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
837 views

Protect files from `rm -f`

Much to my immediate chagrin, removing write permission from a file does 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 ...
5
votes
1answer
3k 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 ...
12
votes
1answer
8k 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
943 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 ...
17
votes
3answers
7k 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 ...
6
votes
1answer
4k 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
280 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 ...