On 03/21/2018 11:36 AM, Neil Bothwick wrote:[snip]
>> rsync -av --delete /Monday/Images/O/OSMANFathia2946/
>> thelma@10.10.0.6:/Monday/Images/O/OSMANFathia2946/ sending incremental
>> file list rsync: failed to set times on
>> "/Monday/Images/O/OSMANFathia2946/.": Operation not permitted (1) ./
>> OSMANFathia6463.pdf
>
> ...you are writing to the destination computer as thelma. You need to use
> a user that can write to the destination directories.
The reason I'm running backup script as user as I mount windows-7
partition to backup some file and I use "--options" with mount command.

So when directory is mounted the owner is root.
When I try to run this command as user:

mount -t cifs gid=1001,uid=1001 -o username=xxxx,password=xxxx
//10.10.0.9/Images /home/thelma/mnt/Images
mount: only root can use "--options" option

Is there a way to mount windows-7 partition as user? Windows-7 runs in
VirtualBox
This way the owner of the mounted directory/files would be thelma:thelma
(not root:root)

>> Destination dir:
>> ll Monday/Images/O/OSMANFathia2946/
>> total 252
>> -rwxr-xr-x 1 root root 44943 Jul 22  2013 OSMANFathia1567.pdf
>> -rwxr-xr-x 1 root root 42493 Jul 30  2013 OSMANFathia1601.pdf
>> -rwxr-xr-x 1 root root 49640 Nov  7  2014 OSMANFathia2822.pdf
>> -rwxr-xr-x 1 root root 56028 Mar 11  2015 OSMANFathia3268.pdf
>> -rwxr-xr-x 1 root root 54155 Oct 19  2015 OSMANFathia3862.pdf
>
> This shows the permissions of  files  within the directory but not the
> directory itself, use ls -ld
ls -al -id /home/thelma/Monday/Images/O/OSMANFathia2946/
34210401 drwxr-xr-x 2 root root 4096 Mar 21 11:22
/home/thelma/Monday/Images/O/OSMANFathia2946/

When I change recursively: chown thelma:thelma -r directory; I was able
to copy all the file correctly.

--
Thelma


Reply via email to