FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-26-2008, 07:20 PM
Chris
 
Default problem setting user and group on mounting a cifs share

I have two different machines on which I am mouting a cifs share with the
following in /etc/fstab

//192.168.178.27/share /mnt/share cifs users,noauto,credentials=/etc/cred
0 0

the mount path on both machines is set to

drwxr-xr-x 2 username users 4096 2008-04-26 20:41 share

On one machine I get the following when the user in /etc/cred mounts the share

drwxrwxrwx 8 root root 0 2008-04-26 20:42 share

directories in share have the user and group "identd users"

on another machine I get this

drwxrwxrwx 8 username username 0 2008-04-26 20:42 share

directoreis have user and group "username username"

I would prefer the second, but can't figure out why it only works on one of
the two machines. The reason I even care is that with the second I can have
the user run rsync -avz without problems, on the machine wich does not set the
user and group I get chgrp and other errors.

Tanks for any suggestion,

C


--
C. Hurschler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-28-2008, 09:36 PM
Mark Clarkson
 
Default problem setting user and group on mounting a cifs share

On Sat, 2008-04-26 at 21:20 +0200, Chris wrote:
> I have two different machines on which I am mouting a cifs share with the
> following in /etc/fstab
>
> //192.168.178.27/share /mnt/share cifs users,noauto,credentials=/etc/cred
> 0 0
>

When the cifs module is loaded check for LinuxExtensionsEnabled in proc:

ls /proc/fs/cifs/LinuxExtensionsEnabled

If it's there turn it off (this will be on the machine with root:root):

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

I guess the other machine has an older cifs which does not have Linux
Extensions or is using smbfs. check with the 'ls ...' line above.

Cheers
Mark


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 07:16 PM
Chris
 
Default problem setting user and group on mounting a cifs share

On Monday 28 April 2008, Mark Clarkson wrote:
> On Sat, 2008-04-26 at 21:20 +0200, Chris wrote:
> > I have two different machines on which I am mouting a cifs share with the
> > following in /etc/fstab
> >
> > //192.168.178.27/share /mnt/share cifs
> > users,noauto,credentials=/etc/cred 0 0
>
> When the cifs module is loaded check for LinuxExtensionsEnabled in proc:
>
> ls /proc/fs/cifs/LinuxExtensionsEnabled
>
> If it's there turn it off (this will be on the machine with root:root):
>
> echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
>
> I guess the other machine has an older cifs which does not have Linux
> Extensions or is using smbfs. check with the 'ls ...' line above.
>
> Cheers
> Mark

Thanks! This solved the uid and gid problems. I
googled "/proc/fs/cifs/LinuxExtensionsEnabled" and found some postings on
this problem. It seems like this is a quasi-bug in mount.cifs.

Unfortunately, although it does not report any errors

rsync -avz /home/user/source /mnt/share/TEST

still does not work as expected. It does copy all the files in the source
directory tree on running the first time. When run a second time it copies
some, but not all files that were archived the first time, although these
files have not been touched since. This is a no-go on a multi-gigabyte file
tree where huge amounts of data are unecessarily transfered. Sigh.

Chris

--
C. Hurschler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 07:40 PM
Mark Clarkson
 
Default problem setting user and group on mounting a cifs share

On Tue, 2008-04-29 at 21:16 +0200, Chris wrote:
> still does not work as expected. It does copy all the files in the
> source
> directory tree on running the first time. When run a second time it
> copies
> some, but not all files that were archived the first time, although
> these
> files have not been touched since. This is a no-go on a
> multi-gigabyte file
> tree where huge amounts of data are unecessarily transfered. Sigh.

Are you sure it actually copied the files or did it just try changing
permissions and such? Maybe run it again and look at the actual number
of bytes transferred rather than the number of files it seemed to
transfer.

How about choosing options explicitly, i.e. don't use -a, so don't set
permissions on files etc. I assume you're mounting M$ W***ws drive on
linux machines so permissions are duff anyway.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 08:00 PM
NN_il_Confusionario
 
Default problem setting user and group on mounting a cifs share

On Tue, Apr 29, 2008 at 09:16:10PM +0200, Chris wrote:
> rsync -avz /home/user/source /mnt/share/TEST
> still does not work as expected.

you could try avoiding -a and using other options instead (see the
google hits for the previous error messages). What is it the filesystem
on the storage device?

Or use other rsync - like instruments like unison (there shuld be also
others, but I use only rsync)

Or try NFS instead of cifs

--
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 08:46 PM
Chris
 
Default problem setting user and group on mounting a cifs share

On Tuesday 29 April 2008, Mark Clarkson wrote:
> On Tue, 2008-04-29 at 21:16 +0200, Chris wrote:
> > still does not work as expected. It does copy all the files in the
> > source
> > directory tree on running the first time. When run a second time it
> > copies
> > some, but not all files that were archived the first time, although
> > these
> > files have not been touched since. This is a no-go on a
> > multi-gigabyte file
> > tree where huge amounts of data are unecessarily transfered. Sigh.
>
> Are you sure it actually copied the files or did it just try changing
> permissions and such? Maybe run it again and look at the actual number
> of bytes transferred rather than the number of files it seemed to
> transfer.
>
> How about choosing options explicitly, i.e. don't use -a, so don't set
> permissions on files etc. I assume you're mounting M$ W***ws drive on
> linux machines so permissions are duff anyway.

it only works with -ruv but not with -t. The time stamp is somehow not in the
cards. Thus the files on the target all have the copy date. Not nice.

C

--
C. Hurschler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 08:48 PM
Chris
 
Default problem setting user and group on mounting a cifs share

On Tuesday 29 April 2008, NN_il_Confusionario wrote:
> On Tue, Apr 29, 2008 at 09:16:10PM +0200, Chris wrote:
> > rsync -avz /home/user/source /mnt/share/TEST
> > still does not work as expected.
>
> you could try avoiding -a and using other options instead (see the
> google hits for the previous error messages). What is it the filesystem
> on the storage device?
>
> Or use other rsync - like instruments like unison (there shuld be also
> others, but I use only rsync)
>
> Or try NFS instead of cifs

I want others (windows) to be able to read the data - that's what I have a NAS
for.

I guess I really will have to look for something other than rsync.

C

>
> --
> Chi usa software non libero avvelena anche te. Digli di smettere.
> Informatica=arsenico: minime dosi in rari casi patologici, altrimenti
> letale. Informatica=bomba: intelligente solo per gli stupidi che ci
> credono.



--
C. Hurschler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-29-2008, 11:06 PM
Mark Clarkson
 
Default problem setting user and group on mounting a cifs share

On Tue, 2008-04-29 at 22:46 +0200, Chris wrote:
> it only works with -ruv but not with -t. The time stamp is somehow
> not in the
> cards. Thus the files on the target all have the copy date. Not
> nice.

No, not nice. I backup a W***ws server over smb nightly, which works
well, but on the linux machine I use fusesmb. I also use the rsync
option '-av --no-p'. I do the copy as root in a crontab, but I'm pretty
sure it mounts as the user that invokes it, so this might be the
alternative you're looking for? Hopefully it behaves as well with your
NAS.

I remember it being a bit of a pain to get working as I glossed over the
documentation a bit quickly so below are two snippets to hopefully save
you some time (naturally it needs the fuse kernel module, and fusesmb
which is in apt.):

-------------------------------------------------------------

$ mkdir ~/.smb/
$ cat <<End > ~/.smb/fusesmb.conf
; Global settings
[global]
; Default username and password
username=
password=

; List hidden shares
;showhiddenshares=true

; Connection timeout in seconds
timeout = 10

;Interval for updating new shares in minutes
;You may want to set this lower - if you are adding/removing shares a
lot.
interval = 10

; Share-specific settings
[WORKGROUOP/MACHINE/SHARE]
username=user
password=userpassword

End

-------------------------------------------------------------

$ chmod 0600 ~/.smb/fusesmb.conf
$ mkdir ~/net
$ fusesmb ~/net

-------------------------------------------------------------

Hope this helps.

Cheers
Mark.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-30-2008, 03:33 AM
NN_il_Confusionario
 
Default problem setting user and group on mounting a cifs share

On Tue, Apr 29, 2008 at 10:48:40PM +0200, Chris wrote:
> On Tuesday 29 April 2008, NN_il_Confusionario wrote:
> > Or try NFS instead of cifs
>
> I want others (windows) to be able to read the data - that's what I have a NAS
> for.

you could use NFS when mounting from linux and the Microsoft protocol
when using the NAS from windows (however, note that Microsoft's SFU are
downloadable at no cost and support NSF as client and as server, from
2000 onwards).

But if the cause of the problem with timestamps is the filesystem on the
disk of the NAS, then it is possible that no full solution really exists
(unless you hack the NAS; wikipedia seem to imply that something like
debian can be installed on your device).

--
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-30-2008, 05:35 AM
Chris
 
Default problem setting user and group on mounting a cifs share

On Wednesday 30 April 2008, Mark Clarkson wrote:
> On Tue, 2008-04-29 at 22:46 +0200, Chris wrote:
> > it only works with -ruv but not with -t. The time stamp is somehow
> > not in the
> > cards. Thus the files on the target all have the copy date. Not
> > nice.
>
> No, not nice. I backup a W***ws server over smb nightly, which works
> well, but on the linux machine I use fusesmb. I also use the rsync
> option '-av --no-p'. I do the copy as root in a crontab, but I'm pretty
> sure it mounts as the user that invokes it, so this might be the
> alternative you're looking for? Hopefully it behaves as well with your
> NAS.
>
> I remember it being a bit of a pain to get working as I glossed over the
> documentation a bit quickly so below are two snippets to hopefully save
> you some time (naturally it needs the fuse kernel module, and fusesmb
> which is in apt.):
>
> -------------------------------------------------------------
>
> $ mkdir ~/.smb/
> $ cat <<End > ~/.smb/fusesmb.conf
> ; Global settings
> [global]
> ; Default username and password
> username=
> password=
>
> ; List hidden shares
> ;showhiddenshares=true
>
> ; Connection timeout in seconds
> timeout = 10
>
> ;Interval for updating new shares in minutes
> ;You may want to set this lower - if you are adding/removing shares a
> lot.
> interval = 10
>
> ; Share-specific settings
> [WORKGROUOP/MACHINE/SHARE]
> username=user
> password=userpassword
>
> End
>
> -------------------------------------------------------------
>
> $ chmod 0600 ~/.smb/fusesmb.conf
> $ mkdir ~/net
> $ fusesmb ~/net
>
> -------------------------------------------------------------
>

Time is not something I have much of... I'm a bit surprised (dissspointed)
that this is so difficult. On the windows side of life there are certainly
tools that allow "normal" userst to perform these kind of things. I use
vice-versa at work to update my laptop files. It's not the smb protokol that
is the problem....

I'll look into your suggestions and script. I'm not familiar with fusemb.

Thanks!

C


--
C. Hurschler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org