Is rsync --delete on some files without write permission possible?
Hello all,
I have a problem with rsync command.
From a backup server, I use a command like the one below:
In some folders of the user there are some files on which he has removed his write permission on purpose.
rsync complains about that:
Of course rsync as root on the user host would resolve the problem, but as I don't like to ssh as root user I was wondering if there would be another solution?
Many thanks for your help and kind regards,
PS: Oh, If you have any best practices reading reference on backup scripts I am very interested!
Thanks in advance!
Thanks for the remark Corona, this is very interesting and I had not realised that!
But back to rsync issue:
If I understand well, the problem from rsync point of view is that it cannot open the file without the write permission, but why on earth do you need write permission to compare 2 files, surely read should be enough?
And why does rsync need to open the file?
rsync does not need write permission to a file to copy it, it only needs read. I suspect you have a read permission problem.
If you are not executing the command as root, which user is executing the command?
It is safe to say not the owner of the file, since it would had copy it.
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
I have a script that synchronises a directory to a DR server, but to improve the time, I actually use rsync to transfer files * in one batch and also
* in another batch - both batches run from the same script and run in the background.
My problem is that there isn't much space on the... (1 Reply)
rsync with --delete won't honor the delete if the source is something/*. I want the delete to work, but not to delete directories on the target that are peer to the intended directory. For example, using these source and target file structures:
Source on desktop:
~/
Money/
... (4 Replies)
In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Hello,
I have some files in a local directory and perform an rsync command with the files in a remote directory, Now when I checked the files in the local and the remote directory, I found some strange filetypes such as this: .nfs0000000001d0c8e000002ff2 , .fuse_hidden000014da00000001 etc etc,... (3 Replies)
Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter.
any body can help me to explain what is that mean?
thank's (1 Reply)
Hi,
I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders.
Instead of running rsync command multiple times for each file, can we achieve this with one time execution?
your help is much... (0 Replies)
I'm a total *nix newb so I really could use some help! :o
I plan on running a cron job on my server that deletes some files and then backs up and emails the website for archival purposes.
Before I get in too deep I'd like to remove some unnecessary files that phpThumb creates. I'm not sure... (4 Replies)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)