# Failed to delete the file

**URL:** <https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690>\
**Category:** CRM/SRM Modules\
**Tags:** v13\
**Created:** [May 10, 2021, 4:21pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690 "2021-05-10T16:21:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lip](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/lip/32/4122_2.png) [@lip](https://www.dolibarr.org/forum/u/lip)\
**Post date:** [May 10, 2021, 4:21pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690/1 "2021-05-10T16:21:48Z")

</div>

Hey guys.

I’m learning to use Dolibarr and I really like it because it is simple to understand and to customize.  
I can’t wait to create my first module! 😃

Anyway.

During my initial use I got some permission issues that I was able to solve by doing this:

```
find /var/www/dolibarr -type d -exec chmod 755 {} \;
find /var/www/dolibarr -type f -exec chmod 644 {} \;

```

However I am not able to delete a order in suppliers  
It is already canceled and with no related objects

I still get “There was a failure to delete the file.” in  
fourn/commande/card.php?id=1&action=delete

Thanks for all the help.

> Debian GNU/Linux 10  
> nginx/1.14.2  
> mysql Ver 15.1 Distrib 10.3.27-MariaDB, for debian-linux-gnu (x86\_64) using readline 5.2  
> PHP 7.3.27-1~deb10u1  
> Dolibarr 13.0.2

---

<div class="post-metadata">

**Author:** ![lip](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/lip/32/4122_2.png) [@lip](https://www.dolibarr.org/forum/u/lip)\
**Post date:** [May 10, 2021, 8:35pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690/2 "2021-05-10T20:35:37Z")

</div>

I was able to delete the order in suppliers excluding the pdf file generated in  
`documents/fournisseur/commande` but I would still like to know how to fix this permission problem.

Thanks.

---

<div class="post-metadata">

**Author:** ![lip](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/lip/32/4122_2.png) [@lip](https://www.dolibarr.org/forum/u/lip)\
**Post date:** [May 11, 2021, 8:55pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690/3 "2021-05-11T20:55:12Z")

</div>

Still looking for answers, I realized that I don’t have write permissions on test at `admin/security_file.php` and “ErrorDirNotWritable” appears. How can I fix this?

Users and groups are defined as follows:

> `user@host:/$ grep ^www /etc/group`  
> `www-data:x:33:git,user,www-data,www`  
> `www:x:1003:git,user,www-data,www`

and all dolibarr files are within the www group `chown -R www /var/www/dolibarr`

Every help is welcome.  
Thanks.

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [May 11, 2021, 9:01pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690/4 "2021-05-11T21:01:10Z")

</div>

And how PHP is installed ?  
What is the Apache user ?

---

<div class="post-metadata">

**Author:** ![dh88uk](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@dh88uk](https://www.dolibarr.org/forum/u/dh88uk)\
**Post date:** [July 10, 2022, 4:16pm UTC](https://www.dolibarr.org/forum/t/failed-to-delete-the-file/20690/5 "2022-07-10T16:16:42Z")

</div>

is it owned correctly?  
mine shows the owner and group as being ‘www-data’ not ‘www’
