0

here a problem with rsync : I try to sync folder A from server A to folder B to server B (from server B) To do that, create special user/ key file / ssh etc.... So my problem is that some files are synchronised and some not (same ownership, folder,...)

I tried multiple option :

rsync -az --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploads/
sudo rsync -az --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/
rsync -rltgoDv --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/
rsync -rtv --force --stats -e "ssh -p 1980 -i /root/key/keyPraUser" [email protected]:/home/mnt/uploads/ /mnt/uploadsBNP/

From server A, to files : file AF1 :

stat 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
  File: 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
  Size: 2438228         Blocks: 4768       IO Block: 4096   regular file
Device: 803h/2051d      Inode: 49551490    Links: 1
Access: (0644/-rw-r--r--)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2024-10-16 10:03:29.647959893 +0200
Modify: 2024-10-11 18:38:50.042744204 +0200
Change: 2024-10-11 18:38:50.042744204 +0200
 Birth: -

File AF2 :

stat fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
  File: fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
  Size: 28602           Blocks: 56         IO Block: 4096   regular file
Device: 803h/2051d      Inode: 49056334    Links: 1
Access: (0644/-rw-r--r--)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2024-10-16 10:50:18.573666612 +0200
Modify: 2024-10-16 10:50:04.325538885 +0200
Change: 2024-10-16 10:50:04.325538885 +0200
 Birth: -

When i run the rsync cmd, got this message :

rsync: send_files failed to open "/home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z": Operation not permitted (1)

On server B when I check if both files were copied, here the result :

(AF1)

stat 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
  File: 50a3c8cb9aeb88f4846f3c5dd6c4d162f43199ae1728664723.7z
  Size: 2438228         Blocks: 4768       IO Block: 4096   regular file
Device: 903h/2307d      Inode: 109445672   Links: 1
Access: (0664/-rw-rw-r--)  Uid: (   33/www-data)   Gid: ( 1002/dev_user)
Access: 2024-10-16 11:18:57.901283844 +0200
Modify: 2024-10-11 18:38:50.042744204 +0200
Change: 2024-10-16 11:30:08.254275812 +0200
 Birth: -

(AF2)

stat fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
stat: cannot stat 'fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z': No such file or directory

More details about server : server A : Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-176-generic x86_64) server B : Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-156-generic x86_64)

If anyone have a clue about this behavior, thanks in advance

Edit :

namei -lx /home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
Drwxr-xr-x root     root     /
Drwxr-xr-x root     root     home
drwxr-xr-x root     root     mnt
drwxr-xr-x www-data www-data uploads
drwxr-xr-x www-data www-data ac
drwxr-xr-x www-data www-data 190
-rw-r--r-- www-data www-data fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z
5
  • Is "Server A" the remote one at 192.168.0.20, and is "Server B" the local system on which the rsync command is being run? Commented Oct 16, 2024 at 13:23
  • Remote server both (vRack tech) both have public and intern IPs Commented Oct 16, 2024 at 13:25
  • That's not helpful, I'm afraid. I'm trying to correlate your "From server A…" and "On server B…" with the paths supplied to the rsync commands ([email protected] and the implied localhost) Commented Oct 16, 2024 at 13:40
  • Okay well Server A is a dedicated server with 2 network card (one for public access (from internet, the other network is for lan network) same for server B. Server A and server B are on the same lan network so for exemple A is 192.168.0.20, B is 192.168.0.6) and public adress for serv A is 164.132.X.X and for serv B is 51.91.X.X. rsync working the same.... lan or public adress Commented Oct 16, 2024 at 13:51
  • You're running the commands on Server B? Commented Oct 16, 2024 at 15:41

1 Answer 1

0
rsync: send_files failed to open "/home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z": Operation not permitted (1)

This error means that the account responsible for reading the source file (pra_user) didn't have sufficient permission to do so. You show that the file permissions are sufficient so you should review the parent directories.

5
  • No, it's have permission (644) and 2 files here with same permissions one working, the other one no (two text file ziped) Commented Oct 16, 2024 at 13:26
  • If a directory has permission 644 then that's your problem Commented Oct 16, 2024 at 13:39
  • No, isn't the problem (dir 755, files 644) like I said in my post, in my respond, 2 files with same properties, stats, permission in the same folder => One working, the other not (tested on 31,697files, 3,320 not synch, all same problems that my exemple) Commented Oct 16, 2024 at 13:44
  • The file permissions are sufficient. You had said nothing about the parent directories' permissions. I'm trying to help you. Can you please add namei -lx '/home/mnt/uploads/ac/190/fcf7f81c1971c46c74fb3548480d0deafe2acfc01700573438.7z' on the remote server to your question Commented Oct 16, 2024 at 15:42
  • Did, and edit question. But I found the answer, gonna make special answer (McAfee Threat Prevention Endpoint Security...) Commented Oct 16, 2024 at 16:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.