Access denied in share after rsync w/ remote server.

Status
Not open for further replies.

di0de

Dabbler
Joined
Oct 19, 2013
Messages
48
using shell I initiated an rsync task to sync my remote server to my local server such as this:
Code:
rsync -avt remoteuser@55.55.55.55:/mnt/remotefolder /mnt/localfolder


After it finished, when I try to access my local folder I get an access denied error. My question: did I (inadvertantly) configure the folder only to be access with my remoteuser account? I haven't tested this yet, but I just wanted to ask and see if there are any other possibilities that I'm missing.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Did you preserve different usernames/permissions? Based on your command you archived so I think you did.. If you have a different username/group setup you probably messed it up.. Just go fix it via root :)

From rsync/linux about.com page
-a, --archive
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything.
Note however that-adoes not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify-H.



-p, --perms
This option causes rsync to update the remote permissions to be the same as the local permissions.

Also check if rsync completed if a permission error occurred it might not of copied everything..
 

di0de

Dabbler
Joined
Oct 19, 2013
Messages
48
Also check if rsync completed if a permission error occurred it might not of copied everything..

This is probably the cause, I didn't mention in the OP, but I think the operation stalled at some point over night because when I checked in the morning it was asking me (again) "the authenticity of host... are you sure you want to continue connecting?"

I said no because I had to take my laptop with me. This is probably the cause of my problem, no? Now the question is: if I re-run the same rsync command, will I be denied due to the permission error? Or will it let me re-run the operation as I did the first time?

As a side note, am I correct in assuming that rsync will only copy files that do not already exist in my local directory? (that's the point of rsync right?)

oh and thanks :)
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
using -a will archive.. sending -rlptgoD in its place.. I would run without the archive tags.. but make sure its recursive -r .. I believe permissions will then be set to whatever is setup on local server.. The one your trying to copy to..
 

di0de

Dabbler
Joined
Oct 19, 2013
Messages
48
I just re-read your post and missed the first time your suggestion to remove the -a tag. Ran the operation last night using -avt and, while it completed fully this time, I am still having the permissions issue on that folder (drives me crazy).

So, should I re-run the operation using -pr and dropping -a? I can view the contents of the folder from the freenas webui so I know the files transfered. I just don't know why I can't access the folder from any of my PC's...

EDIT: Isn't there a way to reset the permissions for this folder w/in FreeNas? Maybe with a chmod command? I am very new to this.

EDIT2: I should add that I have used rsync to download folders w/in the remote directory before without any permissions problems, i.e.:

"rsync -avt remoteuser@55.55.55.55:/mnt/remotefolder/hello /mnt/localfolder"

the "hello" folder transferred to the local server with no permissions errors
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
You want to run without -a or -p.. Just do something simple like one folder with some test files. rsync has a plethora of options to choose from.. -a is really -rlptgoD.. See here.. Examples are on that page.. I would start with a simple test using -rv..

When you trigger -p it's telling rsync to preserve permissions when it copies files from your remote freenas box to your local freenas box.. If you have different users you will end up with permission issues.. If you check what the user/group is on your remote server.. and then check after your done they are probably different..


-p, --perms
This option causes rsync to update the remote permissions to be the same as the local permissions.
 

di0de

Dabbler
Joined
Oct 19, 2013
Messages
48
You want to run without -a or -p..


this I will try. I have already previously done some rsync transfers with subfolders in my remote port, and they did not come with permissions issues. It was only when I synced a larger folder containing everything that I had the problems. I will re-run the operation without -a, and report back, thanks again!
 
Status
Not open for further replies.
Top