[PLUG] Rsync user confusion: Who is user 1026?

John Jason Jordan johnxj at comcast.net
Mon Jul 11 05:42:27 UTC 2016


On Sat, 9 Jul 2016 22:42:04 -0700
John Jason Jordan <johnxj at comcast.net> dijo:

>But to test it I created a 0 byte file 'test' in the source folder, and
>changed the * to test in the above command. At first the command failed
>with a permissions error (although I thought I had read that rsync does
>not require sudo), so I executed the command with sudo. This
>workedjjj at Devil-Bonobo:/media/jjj/Data1$
>mount.cifs //synology.local/synology/ /media/jjj/Synology/ --verbose
>-o user=jjj
Password for jjj@//synology.local/synology/: 
mount.cifs kernel mount options:
ip=192.168.0.101,unc=\\synology.local\synology,auto,uid=1000,gid=1000,user=jjj,pass=********
mount error(22): Invalid argument Refer to the mount.cifs(8) manual 
page (e.g. man mount.cifs)
>without error and the file appeared in the destination. To make sure I
>still owned it I right-clicked on it with Thunar, then Properties >
>Permissions. All the permissions are grayed out and the owner is listed
>as 1026. Checking users and permissions I am user 1000. Yet, in spite
>of the fact that some strange user owns the file, as jjj I can delete
>it, rename it, etc.
>
>So where did user 1026 come from?

I have discovered something that I should have noticed a long time ago,
that is, that the entire drive is owned by root. That would explain the
fact that   the -o --owner and -g --group options are not working in
rsync, leaving the owner of the files the mysterious user 1026.
(I'm betting user 1026 is root on my Xubuntu.) "And why is the drive
owned by root?" you ask. That is because the only way I could mount it
was with sudo.

Fast forward to after several hours of googling and it appears that I
can mount it as jjj only if it is in fstab with 'user' as one of the
options. "No problem," I thought, "I'll just edit up my fstab file."
Here is the line I cooked up:

//synology.local/synology/ /media/jjj/Synology auto auto,user,rw 0 0

My mount command (sans sudo) is:

mount.cifs //synology.local/synology/ /media/jjj/Synology/
	--verbose -o user=jjj

Unfortunately, something is wrong:

mount.cifs //synology.local/synology/ /media/jjj/Synology/ --verbose -o
	user=jjj 
Password for jjj@//synology.local/synology/: 
mount.cifs kernel mount options:
ip=192.168.0.101,unc=\\synology.local\synology,auto,uid=1000,gid=1000,user=jjj,pass=********
mount error(22): Invalid argument 
Refer to the mount.cifs(8) manual	page (e.g. man mount.cifs)

It would have been really helpful if the error message gave me some
clue as to which argument is not valid. I don't even know if it's an
argument in the command or in the fstab line.

So far I have about a dozen hours invested in trying to get this thing
working and I'm close to giving up. Perhaps in the morning my attitude
will be refreshed. In the meantime, if anyone sees anything in the
mount command or the fstab line, please let me know. Any suggestions
are better than what I have now.

I opened the mount.cifs man page and read everything I could
understand. 



More information about the PLUG mailing list