# Nextcloud fpm docker cron ownership issue

**URL:** <https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619>\
**Category:** ℹ️ Support\
**Tags:** docker, fpm\
**Created:** [August 24, 2024, 4:15am UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619 "2024-08-24T04:15:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamashika](https://help.nextcloud.com/letter_avatar/tamashika/32/6_449c533f586939b6e5f246632a46421f.png) [@tamashika](https://help.nextcloud.com/u/tamashika)\
**Post date:** [August 24, 2024, 4:15am UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/1 "2024-08-24T04:15:24Z")

</div>

I have used fstab to mount my ntfs drive with ownership `www-data`, and my nextcloud container has volume in the same ntfs drive.

However, after I setup my cron container for nextcloud, I found it keeps producing this error:

> Console has to be executed with the user that owns the file config/config.php  
> Current user id: 82  
> Owner id of config.php: 33

The weirdest thing is that if I execute the following command, I would get the same error:

```
docker exec -u www-data nextcloud php /var/www/html/cron.php

```

If I replace www-data with 33 as the following, I will not get the same error:

```
docker exec -u 33 nextcloud php /var/www/html/cron.php

```

I have checked that www-data is uid=33, gid=33, groups=33, but why it’s not the same?

BTW, I checked `id 82`, but there is no user with id 82…

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_449c533f586939b6e5f246632a46421f.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [August 24, 2024, 12:34pm UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/2 "2024-08-24T12:34:27Z")

</div>

Is your `cron` container running the same image as your `nextcloud` container? It sounds like maybe one is the `-alpine` image and other not maybe? (You want them to be the same image).

The alpine images use 82/www-data. The debian images use 33/www-data.

---

<div class="post-metadata">

**Author:** ![tamashika](https://help.nextcloud.com/letter_avatar/tamashika/32/6_449c533f586939b6e5f246632a46421f.png) [@tamashika](https://help.nextcloud.com/u/tamashika)\
**Post date:** [August 24, 2024, 10:18pm UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/3 "2024-08-24T22:18:04Z")

</div>

Oh no…I do have both container using `fpm-apline` image, but I didn’t know `fpm-alpine` is for alpine linux. Does that mean raspbian cannot use it?  
Or is it because I had nextcloud docker setup before and the user id for www-data was 33, now if i switched to `fpm-alpine` it won’t work out very well? (I’m using fstab to automount my ntfs with owner www-data, which is currently 33)

(Right now I have everything in fpm-apline, which makes me wonder how the world it works in my raspbian…)

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_449c533f586939b6e5f246632a46421f.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [August 25, 2024, 1:00pm UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/4 "2024-08-25T13:00:15Z")

</div>

Alpine is what runs _in_ the Docker container. Your underlying host’s OS isn’t relevant (for the most part). e.g. [docs/php/README.md at master · docker-library/docs · GitHub](https://github.com/docker-library/docs/blob/master/php/README.md#phpversion-alpine)

> Or is it because I had nextcloud docker setup before and the user id for www-data was 33, now if i switched to `fpm-alpine` it won’t work out very well? (I’m using fstab to automount my ntfs with owner www-data, which is currently 33)

Yes, the UID changes: [https://github.com/nextcloud/docker/issues/601](https://github.com/nextcloud/docker/issues/601)

---

<div class="post-metadata">

**Author:** ![tamashika](https://help.nextcloud.com/letter_avatar/tamashika/32/6_449c533f586939b6e5f246632a46421f.png) [@tamashika](https://help.nextcloud.com/u/tamashika)\
**Post date:** [August 26, 2024, 12:58am UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/5 "2024-08-26T00:58:01Z")

</div>

Do you know if there a way I can make www-data in the fpm-apline version of nextcloud container to use id 33 instead of 82?

I saw there was a git issue but it seems to be shut down quickly by the “user” option in docker compose file. After trying that “user: 33:33” in my docker compose file for all nextcloud related containers, I found this option didn’t work out well for me. I started seeing some permission error in my nextcloud docker, not too sure what’s going on there.

Another method I tried was using the command: `docker exec nextcloud chown -R www-data:root /var/www` (nextcloud is my nextcloud container name), but that didn’t work out either.

Right now I guess I’ll have to change my www-data on host to 82 instead of 33, and then automount my ntfs drive to 82

Wonder if there is a better way.

Thanks…

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [November 24, 2024, 12:58am UTC](https://help.nextcloud.com/t/nextcloud-fpm-docker-cron-ownership-issue/201619/6 "2024-11-24T00:58:28Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
