# External storage Invalid cross-device link

**URL:** <https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555>\
**Category:** ℹ️ Support\
**Tags:** external\_storage, nc15\
**Created:** [March 15, 2019, 1:09am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555 "2019-03-15T01:09:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinux](https://help.nextcloud.com/letter_avatar/cinux/32/5_5575768a8748004e209b776fc1b2916d.png) [@cinux](https://help.nextcloud.com/u/cinux)\
**Post date:** [March 15, 2019, 1:09am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/1 "2019-03-15T01:09:09Z")

</div>

Hi all,

The issue you are facing:

If i try to remove a folder in an external storage i face the message that during the process an error occured. Of course i try it via Webinterface.  
But I have refresh the site the folder got deleted.  
In the logfiles are following information

```auto
Nextcloud[10112]: {PHP} rename(): The first argument to copy() function cannot be a directory at /usr/share/nginx/nextcloud/lib/private/Files/Storage/Local.php#272
Nextcloud[10112]: {PHP} rename(//media/Video/tmp/test,//mnt/nextcloud/data/cinux/files_trashbin/files/test.d1552610147): Invalid cross-device link at /usr/share/nginx/nextcloud/lib/private/Files/Storage/Local.php#272

```

As far as i have understand the problem is, that the external storage is a different partition as the data location of nextcloud itself. Also its sounds like a php issue itself. But this will not help me here to be able to create and delete folders on external storages… I’m much more surprised that there are not so many contributions about this problem. Because more or less everyone will have a external storage with an bigger HDD then that one where nextcloud is running on it.

Nextcloud version _(eg, 12.0.2)_: 15.0.4  
Operating system and version _(eg, Ubuntu 17.04)_: Centos7  
Apache or nginx version _(eg, Apache 2.4.25)_: nginx 1.12.2  
PHP version _(eg, 7.1)_: 7.2.14

Steps to replicate it:  
unsure but:

1. change the data folder of nextcloud (not sure if it related to the issue)
2. add an external storage which is located on a other partition
3. create a folder in the external storage via WebGui and try to remove it

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [March 15, 2019, 3:29pm UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/2 "2019-03-15T15:29:07Z")

</div>

> [@cinux](#):
>
> Because more or less everyone will have a external storage

This is an assumption and does not apply to me.

> [@cinux](#):
>
> But I have refresh the site the folder got deleted.

Do you mean that after you refreshed to web page the folder went away and has been deleted on your external storage?

---

<div class="post-metadata">

**Author:** ![cinux](https://help.nextcloud.com/letter_avatar/cinux/32/5_5575768a8748004e209b776fc1b2916d.png) [@cinux](https://help.nextcloud.com/u/cinux)\
**Post date:** [March 15, 2019, 6:32pm UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/3 "2019-03-15T18:32:10Z")

</div>

> [@rakekniven](#):
>
> This is an assumption and does not apply to me.

Ok Ok, maybe not all will use external storage. 😉

> [@rakekniven](#):
>
> Do you mean that after you refreshed to web page the folder went away and has been deleted on your external storage?

Yes, i trigger the deletion of the folder in the web page. I receive the message that it failed with an error and if i refresh the website the folder went away. Of course also from the external storage.

---

<div class="post-metadata">

**Author:** ![Oleg\_Andreych](https://help.nextcloud.com/letter_avatar/oleg_andreych/32/5_5575768a8748004e209b776fc1b2916d.png) [@Oleg\_Andreych](https://help.nextcloud.com/u/Oleg_Andreych)\
**Post date:** [March 17, 2019, 9:16am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/4 "2019-03-17T09:16:42Z")

</div>

Hello everyone.

Same situation here. Found this topic while googling for a solution.  
I’m using Nextcloud form docker. External storage is a volume mounted to container. On the other side of the volume just a folder on a regular linux ext4 parition.

---

<div class="post-metadata">

**Author:** ![Capusjon](https://help.nextcloud.com/letter_avatar/capusjon/32/5_5575768a8748004e209b776fc1b2916d.png) [@Capusjon](https://help.nextcloud.com/u/Capusjon)\
**Post date:** [March 23, 2020, 11:53am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/5 "2020-03-23T11:53:05Z")

</div>

I’m having exactly the same issue. Mostly the files get deleted but not always. Removing a folder holding 32GB of photos in it didnt go very smoothly and resulted in Locked files.

Does anyone have a decent solution for the errors on deleting from external storage?

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [March 23, 2020, 4:14pm UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/6 "2020-03-23T16:14:19Z")

</div>

You are replying to an old topic (Nextcloud 15).  
Please add a new one and add information regarding your system setup.

---

<div class="post-metadata">

**Author:** ![Capusjon](https://help.nextcloud.com/letter_avatar/capusjon/32/5_5575768a8748004e209b776fc1b2916d.png) [@Capusjon](https://help.nextcloud.com/u/Capusjon)\
**Post date:** [March 24, 2020, 8:14am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/7 "2020-03-24T08:14:59Z")

</div>

sorry… Now I see. The issues seemed so similar, I was like finally someone with the same issue 😉

Ill make a new thread.

---

<div class="post-metadata">

**Author:** ![DaniloMussolini](https://help.nextcloud.com/user_avatar/help.nextcloud.com/danilomussolini/32/35278_2.png) [@DaniloMussolini](https://help.nextcloud.com/u/DaniloMussolini)\
**Post date:** [June 24, 2021, 2:53pm UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/8 "2021-06-24T14:53:17Z")

</div>

What’s the new thread for this issue? Same problem here…

Thanks!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 9:32am UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/9 "2024-12-04T09:32:50Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 2:38pm UTC](https://help.nextcloud.com/t/external-storage-invalid-cross-device-link/49555/10 "2024-12-11T14:38:28Z")

</div>


