Discussion:
gvfs mount vs mount.cifs
Colin Fee
2012-04-27 03:54:13 UTC
Permalink
On my work notebook running LMDE with cinnamon I can use nautilus to
"connect to server", in this case my 'home' share on the Monash windows AD
service.
The connection I get gives me all pertinent file system rights and appears
in the .gvfs folder in my home folder with the expected rights as well.

However if I issue a direct mount.cifs command thus:

~$ sudo mount.cifs
//ad.monash.edu/home/my-server-name/colinfee/home/colinfee/ad-home
-ocredentials=/home/colinfee/.smb/ad-credentials

It mounts but with the /home/colinfee/ad-home and subfolders etc owned by
root.

Varying the mount command thus makes no difference

~$ sudo mount.cifs
//ad.monash.edu/home/my-server-name/colinfee/home/colinfee/ad-home
-ocredentials=/home/colinfee/.smb/ad-credentials,uid=colinfee,gid=colinfee,setuids

~$ ls -ald ad-home
drwxr-xr-x 6 root root 0 Apr 16 16:42 ad-home/

I've also tried the forceuid/gid options too. I can use file_mode=0777 and
dir_mode=077 to override the issue but it seems like cheating.

Is what I'm seeing an artefact of my local LMDE system or the remote
Windows AD share?
As it works via the nautilus fuse method, why not mount?

Ultimately what I'm trying to do is mount the share and use rsync to sync
my local files to the server.
--
Colin Fee
***@gmail.com
Jason White
2012-04-27 04:24:31 UTC
Permalink
Post by Colin Fee
~$ sudo mount.cifs
//ad.monash.edu/home/my-server-name/colinfee/home/colinfee/ad-home
-ocredentials=/home/colinfee/.smb/ad-credentials
It mounts but with the /home/colinfee/ad-home and subfolders etc owned by
root.
Is ~/ad-home owned by you? Make sure that it is. Specifically, when the remote
file system is not mounted, the mount point at ~/ad-home should have your user
as its owner.

I haven't used CIFS, so I can't comment further.
Colin Fee
2012-04-27 04:31:04 UTC
Permalink
Post by Jason White
Post by Colin Fee
~$ sudo mount.cifs
//ad.monash.edu/home/my-server-name/colinfee/home/colinfee/ad-home
-ocredentials=/home/colinfee/.smb/ad-credentials
It mounts but with the /home/colinfee/ad-home and subfolders etc owned by
root.
Is ~/ad-home owned by you? Make sure that it is. Specifically, when the remote
file system is not mounted, the mount point at ~/ad-home should have your user
as its owner.
I haven't used CIFS, so I can't comment further.
_______________________________________________
luv-main mailing list
http://lists.luv.asn.au/listinfo/luv-main
Yep, certainly is.

***@don-diego:~$ ls -ald ad-home/
drwxr-xr-x 2 colinfee colinfee 6 Apr 26 16:45 ad-home/
--
Colin Fee
***@gmail.com
Jason White
2012-04-27 05:02:08 UTC
Permalink
Post by Colin Fee
Post by Jason White
Is ~/ad-home owned by you? Make sure that it is. Specifically, when the remote
file system is not mounted, the mount point at ~/ad-home should have your user
as its owner.
Yep, certainly is.
drwxr-xr-x 2 colinfee colinfee 6 Apr 26 16:45 ad-home/
When you specify the uid and gid explicitly to the mount command, is there
anything added to the log files that looks suspect?

Unless someone else on the list knows, I suspect it's one for the Samba list.
Toby Corkindale
2012-04-27 05:02:41 UTC
Permalink
Try adding this parameter to the mount.cifs command:
-o uid=colinfee

----- Original Message -----
From: "Colin Fee" <***@gmail.com>
To: "LUV Main" <luv-***@luv.asn.au>
Sent: Friday, 27 April, 2012 1:54:13 PM
Subject: gvfs mount vs mount.cifs


On my work notebook running LMDE with cinnamon I can use nautilus to "connect to server", in this case my 'home' share on the Monash windows AD service.
The connection I get gives me all pertinent file system rights and appears in the .gvfs folder in my home folder with the expected rights as well.

However if I issue a direct mount.cifs command thus:

~$ sudo mount.cifs // ad.monash.edu/home/my-server-name/colinfee /home/colinfee/ad-home -ocredentials=/home/colinfee/.smb/ad-credentials

It mounts but with the /home/colinfee/ad-home and subfolders etc owned by root.

Varying the mount command thus makes no difference

~$ sudo mount.cifs // ad.monash.edu/home/my-server-name/colinfee /home/colinfee/ad-home -ocredentials=/home/colinfee/.smb/ad-credentials,uid=colinfee,gid=colinfee,setuids

~$ ls -ald ad-home
drwxr-xr-x 6 root root 0 Apr 16 16:42 ad-home/

I've also tried the forceuid/gid options too. I can use file_mode=0777 and dir_mode=077 to override the issue but it seems like cheating.

Is what I'm seeing an artefact of my local LMDE system or the remote Windows AD share?
As it works via the nautilus fuse method, why not mount?

Ultimately what I'm trying to do is mount the share and use rsync to sync my local files to the server.
--
Colin Fee
***@gmail.com
Jason White
2012-04-27 05:13:45 UTC
Permalink
Post by Toby Corkindale
-o uid=colinfee
Yes, try it without specifying gid or any other options.
Colin Fee
2012-04-27 05:52:08 UTC
Permalink
Post by Jason White
Post by Toby Corkindale
-o uid=colinfee
Yes, try it without specifying gid or any other options.
_______________________________________________
luv-main mailing list
http://lists.luv.asn.au/listinfo/luv-main
Tried it, same result.

However if I specify the uid and gid as the numeric value it works!

~$ sudo mount.cifs
//ad.monash.edu/home/my-server-name/colinfee/home/colinfee/ad-home
-ocredentials=/home/colinfee/.
smb/ad-credentials,uid=1000,gid=1000


~$ ls -ald ad-home/
drwxr-xr-x 6 colinfee colinfee 0 Apr 16 16:42 ad-home/

According to man mount.cifs

uid=arg
sets the uid that will own all files or directories on the
mounted
filesystem when the server does not provide ownership
information.
It may be specified as either a username or a numeric uid. When
not
specified, the default is uid 0. The mount.cifs helper must be at
version 1.10 or higher to support specifying the uid in
non-numeric
form. See the section on FILE AND DIRECTORY OWNERSHIP AND
PERMISSIONS below for more information.

...and

~$ sudo mount.cifs -V
mount.cifs version: 5.3
--
Colin Fee
***@gmail.com
Jason White
2012-04-28 05:47:11 UTC
Permalink
Post by Colin Fee
Tried it, same result.
However if I specify the uid and gid as the numeric value it works!
[snip]

That merits a bug report, or at least an inquiry on the appropriate list
(perhaps via Gmane if you don't want to subscribe to another list).
Loading...