# Cannot delete aything in rrd directory

**URL:** <https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837>\
**Category:** Installing & Running IPFire\
**Created:** [4 January 2024 22:38 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837 "2024-01-04T22:38:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gta\_doum](https://community.ipfire.org/user_avatar/community.ipfire.org/gta_doum/32/9693_2.png) [@gta\_doum](https://community.ipfire.org/u/gta_doum)\
**Post date:** [4 January 2024 22:38 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/1 "2024-01-04T22:38:23Z")

</div>

Hello,  
I have the latest firmware of ipFire, 182. I added a QoS category, which forgot to create the corresponding rrd file. I did a touch on the file name, but this was not a good way to fix this. Now I’m trying to delete that file to copy from another one, but ipFire does not let me delete it. I stopped collectd service, still cannot delete any files in /var/log/rrd directory.  
How to delete the files in that directory?

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [4 January 2024 22:46 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/2 "2024-01-04T22:46:08Z")

</div>

You should be able to delete it.

What command did you enter and what error do you see? A copy & paste, or a screenshot (or a camera pic) would be great!

---

<div class="post-metadata">

**Author:** ![wiztech](https://community.ipfire.org/user_avatar/community.ipfire.org/wiztech/32/15242_2.png) [@wiztech](https://community.ipfire.org/u/wiztech)\
**Post date:** [4 January 2024 23:17 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/3 "2024-01-04T23:17:12Z")

</div>

Hello,  
If you are logged into a terminal as **root** then you should be able to delete any file. I suspect there might be unusual permissions on the file you created manually. If the permissions on the file you are trying to delete are not **-rw-r–r-- root root** (which allow root to read/write) then try **chmod 777** on the file to reset the permissions then delete it.

_Below is a successful test of create and delete in the folder (v182 with collectd still running):_

> [root@ipfire1 ~]# **touch /var/log/rrd/testfile.txt**

> [root@ipfire1 ~]# **ls -al /var/log/rrd/**  
> total 152  
> drwxr-xr-x 4 root root 4096 Jan 4 16:00 .  
> drwxr-xr-x 19 root root 12288 Jan 3 14:14 …  
> drwxr-xr-x 3 root root 4096 Jan 4 15:56 collectd  
> -rw-r–r-- 1 root root 28728 Jan 4 16:00 hddshutdown-sda.rrd  
> -rw-r–r-- 1 root root 28728 Jan 4 16:00 hddtemp-sda.rrd  
> **-rw-r–r-- 1 root root** 0 Jan 4 16:00 **testfile.txt**  
> drwxr-xr-x 2 root root 4096 Dec 19 19:40 wio

> [root@ipfire1 ~]# **rm /var/log/rrd/testfile.txt**  
> **rm: remove regular empty file ‘/var/log/rrd/testfile.txt’? y**

> [root@ipfire1 ~]# **ls -al /var/log/rrd/**  
> total 152  
> drwxr-xr-x 4 root root 4096 Jan 4 16:01 .  
> drwxr-xr-x 19 root root 12288 Jan 3 14:14 …  
> drwxr-xr-x 3 root root 4096 Jan 4 15:56 collectd  
> -rw-r–r-- 1 root root 28728 Jan 4 16:00 hddshutdown-sda.rrd  
> -rw-r–r-- 1 root root 28728 Jan 4 16:00 hddtemp-sda.rrd  
> drwxr-xr-x 2 root root 4096 Dec 19 19:40 wio  
> [root@ipfire1 ~]#

* * *

**EDIT** : made into quote

---

<div class="post-metadata">

**Author:** ![gta\_doum](https://community.ipfire.org/user_avatar/community.ipfire.org/gta_doum/32/9693_2.png) [@gta\_doum](https://community.ipfire.org/u/gta_doum)\
**Post date:** [5 January 2024 16:16 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/4 "2024-01-05T16:16:26Z")

</div>

Yes I am as root and none of the files in that directory can be deleted. There is no error messages. I type “rm file”, it does not matter which file, the prompt comes back like it worked, but an ls shows that the file is still there. I even created a dummy file and now I am unable to delete it.

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [5 January 2024 18:30 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/5 "2024-01-05T18:30:22Z")

</div>

Usually, if root can’t delete a file then the file attributes have been made either append only or immutable.

What results do you get if you run the command

`lsattr /var/log/rrd`

You should just see the e attribute. If there are either i or a attributes then the files have been made immutable or append-only.

What is making that happen is another question but lets see first what the file attributes of the files you can’t delete are.

---

<div class="post-metadata">

**Author:** ![gta\_doum](https://community.ipfire.org/user_avatar/community.ipfire.org/gta_doum/32/9693_2.png) [@gta\_doum](https://community.ipfire.org/u/gta_doum)\
**Post date:** [5 January 2024 20:26 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/6 "2024-01-05T20:26:02Z")

</div>

[root@ipfire-vertika rrd]# lsattr  
--------------e------- ./class\_1-1\_red0.rrd  
--------------e------- ./class\_2-210\_imq0.rrd  
--------------e------- ./class\_2-220\_imq0.rrd  
--------------e------- ./class\_2-204\_imq0.rrd  
--------------e------- ./class\_1-101\_red0.rrd  
--------------e------- ./class\_test  
--------------e------- ./class\_1-105\_red0.rrd  
--------------e------- ./hddtemp-sda.rrd  
--------------e------- ./class\_2-200\_imq0.rrd  
--------------e------- ./class\_2-1\_imq0.rrd  
--------------e------- ./class\_1-120\_red0.rrd  
--------------e------- ./class\_1-104\_red0.rrd  
--------------e------- ./class\_1-110\_red0.rrd  
--------------e------- ./hddshutdown-sda.rrd  
--------------e------- ./class\_1-103\_red0.rrd  
--------------e------- ./collectd  
--------------e------- ./class\_2-203\_imq0.rrd  
--------------e------- ./class\_1-102\_red0.rrd

class\_1-105\_red0.rrd and class\_test are the files I would like to delete, but I tried on every files for “fun” and none can be deleted.  
So far those three services I tried to stop to no avail : collectd, vnstat and sysklogd.

---

<div class="post-metadata">

**Author:** ![gta\_doum](https://community.ipfire.org/user_avatar/community.ipfire.org/gta_doum/32/9693_2.png) [@gta\_doum](https://community.ipfire.org/u/gta_doum)\
**Post date:** [5 January 2024 20:51 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/7 "2024-01-05T20:51:51Z")

</div>

Ok, I found the culprit, a bad french habit of mine… Instead of pressing “y” to accept the deletion, I was pressing “o” (for oui, yes in french), and of course, the file would not get deleted…

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [5 January 2024 20:59 UTC](https://community.ipfire.org/t/cannot-delete-aything-in-rrd-directory/10837/8 "2024-01-05T20:59:02Z")

</div>

Oh well. At least you have solved the problem and can concentrate on the qos configuration again.
