Results 1 to 7 of 7
Hello,
I am trying to sync data from Server A to Server B. The destination on Server B is a CIFS share and I need to preserve timestamps, permissions, etc. ...
- 01-28-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 5
[SOLVED] Permissions Issue with CIFS Share and RSYNC
Hello,
I am trying to sync data from Server A to Server B. The destination on Server B is a CIFS share and I need to preserve timestamps, permissions, etc. on all the data that I transfer. During the rsync process, I receive thousands of errors like the one below:
rsync: chown "/LBDCASAN001/JasonHarper/files/1259810304676/2010-12-22-01-00-03/0x22/0xc8/0x43/0x0a" failed: Permission denied (13)
I'm not sure if it's related at all, but my mount point on Server B has the permissions set as: drwxr-xr-x 2 root root when it is unmounted. When I mount the CIFS share, the mount point permissions change to: drwxrws---+ 3 root root
Also, here is the line from my /etc/fstab that mounts the share:
//X.X.X.X/LBXXXXX001 /LBXXXXX001 cifs username=LBXXXXX001,password=XXXXXXX!,uid=0,gid=0 0 0
When I perform the rsync, I'm authenticating to Server B from Server A as root. I'm just not sure what's going on or how to fix it. I would be so grateful for any help/advice!
Thank you!
Jason
- 01-28-2011 #2
Well, CIFS translates between posix and windows style filepermissions (among many other things)
So, the permissions you see on linux side for a cifs share are more or less only virtual.
For that reason, you cannot preserve posix timestamps/users on a cifs.
If the destination needs to be a cifs, then you could use a container like tar.You must always face the curtain with a bow.
- 01-28-2011 #3Just Joined!
- Join Date
- Jan 2011
- Posts
- 5
Thank you for the reply! Is there some other way I should mount the share that will allow me to preserve timestamps/permissions during the rsync?
- 01-28-2011 #4
You could use rsync alone -over ssh or directly-
As a side-effect, this is also faster.You must always face the curtain with a bow.
- 01-28-2011 #5Just Joined!
- Join Date
- Jan 2011
- Posts
- 5
OK - sorry for not understanding. I am using rsync over ssh to transfer the data:
rsync -avz -e 'ssh -p 2555' --progress /lbxxxxxx001-data/storage/JasonHarper/ root@vault-xxx.xxxxxx.com:/LBxxxxxx001/JasonHarper/
Did you mean something different? Thank you!!!
- 01-28-2011 #6
I meant exactly that, but I (wrongly) assumed, that the destination "vault-xxx.xxxxxx.com:/LBxxxxxx001/JasonHarper/ " would be posix compliant
What is vault-xxx.xxxxxx.com? is it a windows or unix machine?
if windows: sorry, you need to use a container to preserve posix users/permissions
if unix: is it possible, to create new directory, that is not on cifs?
Other than that, maybe a backup service, such as bacula can be usefull?You must always face the curtain with a bow.
- 01-28-2011 #7Just Joined!
- Join Date
- Jan 2011
- Posts
- 5
OK - thanks. It's a Linux machine but the machine itself has very little storage. The CIFS share is the only thing large enough to hold the data I'm transferring. At least now I know I wasn't losing my mind. I appreciate the help!


