Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Permission-Problem beim kopiern von Daten von disk1 zu disk2

Featured Replies

Hallo zusammen,

ich möchte einige Dateien mit rsync -vahP von disk1 auf disk2 kopieren, jedoch erhalte ich die Fehlermeldung „failed: Operation not permitted (1)“.

Was mache ich falsch?

Der vollständige Befehl lautet:

rsync -vahP /mnt/disk1/backup/java /mnt/disk2/datest/

(Der Ordner „java” soll mit seinem gesamten Inhalt in den Ordner „datest” kopiert werden.)

Screenshot 2025-08-13 135357.png

  • Community Expert

Hast Du Schreibrechte im Zielordner?

Meinst Du wirklich die Option "h", oder eher "H"?

  • Community Expert
1 hour ago, Netrunn3r said:

Hallo zusammen,

ich möchte einige Dateien mit rsync -vahP von disk1 auf disk2 kopieren, jedoch erhalte ich die Fehlermeldung „failed: Operation not permitted (1)“.

Was mache ich falsch?

Ich mache sowas mit mc.

Da habe ich eigentlich keine Zugriffsprobleme, selbst wenn ein sabnnzb (ich777) mal wieder ein Unterverzeichnis angelegt hat das ich über SMB oder so nicht löschen kann (und die darin enthaltenen dateien auch nicht).

  • Community Expert

Da rsync über das Terminal als root läuft, sind die Fehlermeldungen tatsächlich komisch.

Was man aber sieht:

  • zuerst kopiert er erfolgreich .../java/awt/Stroke.html

  • 6 Operationen danach kommt dann ein Fehler zu .../java/awt/.Stroke.html.Q4Hcxj

Da rsync standardmäßig Temp-Dateien erzeugt, handelt es sich also um die selbe Datei, die 2x kopiert wird.

Daraus schließe ich, dass du -H (--hard-links) benötigst, weil hier in der Quelle ein Hardlink auf die selbe Datei verweist und du ohne -H diese Datei ansonsten 2x am Ziel erzeugst.

Wobei ich tatsächlich nicht verstehe, warum rsync sich daran stört. Da das ja nicht parallel, sondern hintereinander passiert, könnte rsync ja einfach 2x die Datei erzeugen, also einfach die Zieldatei noch mal überschreiben, aber evtl macht rsync das intern nicht und erzeugt lieber einen Fehler (der dann aber echt kryptisch ist ^^).

Mal einen Test machen:

mkdir /tmp/source

touch /tmp/source/test.txt

ln /tmp/source/test.txt /tmp/source/hardlink-auf-test.txt

# stat /tmp/source/*

File: /tmp/source/hardlink-auf-test.txt

Size: 0 Blocks: 0 IO Block: 4096 regular empty file

Device: 0,2 Inode: 1868831 Links: 2

Access: (0666/-rw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2025-08-13 20:45:48.864189719 +0200

Modify: 2025-08-13 20:45:48.864189719 +0200

Change: 2025-08-13 20:46:57.617528412 +0200

Birth: 2025-08-13 20:45:48.864189719 +0200

File: /tmp/source/test.txt

Size: 0 Blocks: 0 IO Block: 4096 regular empty file

Device: 0,2 Inode: 1868831 Links: 2

Access: (0666/-rw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2025-08-13 20:45:48.864189719 +0200

Modify: 2025-08-13 20:45:48.864189719 +0200

Change: 2025-08-13 20:46:57.617528412 +0200

Birth: 2025-08-13 20:45:48.864189719 +0200

Wir haben also zwei Dateien mit gleicher Inode und 2 Links (= Hardlinked)

Dann weiter:

mkdir /tmp/destination

# rsync -vahP /tmp/source /tmp/destination/

sending incremental file list

source/

source/hardlink-auf-test.txt

0 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3)

source/test.txt

0 100% 0.00kB/s 0:00:00 (xfr#2, to-chk=0/3)

sent 212 bytes received 58 bytes 540.00 bytes/sec

total size is 0 speedup is 0.00

# stat /tmp/destination/source/*

File: /tmp/destination/source/hardlink-auf-test.txt

Size: 0 Blocks: 0 IO Block: 4096 regular empty file

Device: 0,2 Inode: 1869897 Links: 1

Access: (0666/-rw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2025-08-13 20:47:54.994976735 +0200

Modify: 2025-08-13 20:45:48.864189719 +0200

Change: 2025-08-13 20:47:54.994976735 +0200

Birth: 2025-08-13 20:47:54.994976735 +0200

File: /tmp/destination/source/test.txt

Size: 0 Blocks: 0 IO Block: 4096 regular empty file

Device: 0,2 Inode: 1869898 Links: 1

Access: (0666/-rw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2025-08-13 20:47:54.994976735 +0200

Modify: 2025-08-13 20:45:48.864189719 +0200

Change: 2025-08-13 20:47:54.994976735 +0200

Birth: 2025-08-13 20:47:54.994976735 +0200

Ohne -h hat rsync beide Dateitn neu erstellt. Spricht also gegen meine Theorie und wenn ich jetzt drüber nachdenke, eigentlich auch logisch. 😅

Was passiert dann 🤔

Vielleicht ein hardgelinkter Ordner... macht eigentlich auch keinen Sinn.

Sicher, dass du rsync nicht versehentlich 2x parallel gestartet hast?

Du nutzt ja -P, also --partial. Vom Prinzip braucht man das ja nur, wenn man mit Abbrüchen rechnet. Lass das mal weg und verwende stattdessen --inplace, so dass gar keine temp-Datei erzeugt wird. Außerdem macht es bei einem Backup in ein einziges Verzeichnis wenig Sinn, wenn du kein --delete verwendest, weil bei jedem neuen sync, würden ja vom Ziel verschwundene Dateien im Ziel-Backup verbleiben = evtl korruptes Backup.

Falls die Quelldateien außerhalb von Unraid erzeugt wurden zB in einem Docker oder einer VM, solltest du außerdem --numeric-ids in Betracht ziehen.

Mein Vorschlag daher:

rsync --verbose --archive --hard-links --numeric-ids --human-readable --progress --inplace --delete /mnt/disk1/backup/java /mnt/disk2/datest/

Warum aber dein Fehler kommt, hätte ich trotzdem gerne gewusst 😅

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.