Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] mv errors.

413 views
Skip to first unread message

Athunye

unread,
Jan 29, 2009, 4:20:12 PM1/29/09
to

I have Debian Etch with Samba.
I windows clients I do not get any errors when move files to the /mnt/videos
on the server.
However n Linux clients I do get some errors. (Using rox-filer or the mv
command-line).

This are the errors:
bash >>> mv post.txt share/
mv: preserving times for `share/post.txt': Invalid argument
mv: setting permissions for `share/post.txt': No such file or directory

Notice that if I cp I do not get those errors.

http://pastebin.com/f32cd160a Here is the pastebin of the server
/etc/samba/smb.conf and the /etc/fstab of the Linux client.

Also:
ls -l /mnt/drwxr-xr-x 2 root nando 4096 2009-01-26 22:56 videos

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21712791.html
Sent from the Samba - General mailing list archive at Nabble.com.

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Kyle Rabe

unread,
Jan 29, 2009, 4:40:12 PM1/29/09
to
On Thu, Jan 29, 2009 at 4:17 PM, Athunye <Ath...@gmail.com> wrote:

> Notice that if I cp I do not get those errors.
>

> <http://pastebin.com/f32cd160a> Also:


> ls -l /mnt/drwxr-xr-x 2 root nando 4096 2009-01-26 22:56 videos
>

Is your Linux user "root" or a member of the "nando" group? Since you can
cp but not mv, I think it could be a permissions issue on the origin file or
directory. You can read it - that's why cp works - but not write to it - mv
tries to delete the file after copying.

You don't get errors when moving Windows files to the /mnt/videos share
because they're allowed to write there. You get errors when you move a file
in Linux because you don't have permission to delete the original. It
concerns me, though, that your Windows clients are allowed to write to
/mnt/videos since that *should* mean that they're using root credentials...

That's my guess, anyway.

-Kyle

Athunye

unread,
Jan 29, 2009, 5:00:09 PM1/29/09
to

On the server:

$ ls -l /mnt/
drwxrwxr-x 2 root docs 4096 2009-01-29 19:11 docs

$ groups smbuser
smbuser: smbuser docs


On the Linux client:

$ whoami
debuser

$ ls -l /mnt/
dr-xrwxr-x 2 root docs 4096 2009-01-29 10:49 docs

$ groups debuser
debuser : debuser dialout cdrom floppy audio video plugdev share arquivos
docs

Now see this:

$ mount /mnt/docs/
(no errors)

$ pwd
/home/debuser

$ touch test.txt
$ cp test.txt /mnt/docs/
(no errors)

$ touch test2.txt
$ mv test2.txt /mnt/docs/
mv: preserving times for `/mnt/docs/test2.txt': Operation not permitted
mv: setting permissions for `/mnt/docs/test2.txt': Operation not permitted

Since I'm moving a file I created myselfe, it must not be "permission to
delete the original".

And finaly, see this:

$ cd /mnt/docs/
$ pwd
/mnt/docs
$ touch
$ echo "test" > test3.txt
(no errors)

$ touch test4.txt
touch: setting times of `test4.txt': Permission denied

I can't understand what is going on...
--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21736641.html


Sent from the Samba - General mailing list archive at Nabble.com.

--

Kyle Rabe

unread,
Jan 29, 2009, 5:50:10 PM1/29/09
to
Very odd indeed. Sorry - I couldn't tell exactly what was going on from
your original message.

-Kyle

Athunye

unread,
Jan 29, 2009, 6:00:16 PM1/29/09
to

Sure. That is very odd. And that is driving me crazy because I have this
problem in an business environment. The employees are willing to kill me
already. :D
--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21737939.html

Sent from the Samba - General mailing list archive at Nabble.com.

--

Avron Gray

unread,
Jan 29, 2009, 6:50:09 PM1/29/09
to
I'd be interested to see how you are declaring the share points in
smb.conf.

One possible explaination is that each group is being given differing
permission types for the same volume.

- Avron

Athunye

unread,
Jan 29, 2009, 7:30:10 PM1/29/09
to

[global]
netbios name = Server
workgroup = Grupo
unix extensions = yes
case sensitive = yes
ea support = yes
#msdfs root = no
server string = Servidor Samba
encrypt passwords = yes
hosts allow = 192.168.1.
interfaces = eth1
bind interfaces only = yes
local master = yes
os level = 100
preferred master = yes
wins support = yes
map to guest = bad user
guest account = smbuser

[docs]
path = /mnt/docs
writable = yes
valid users = smbuser

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21739237.html

Günter Kukkukk

unread,
Jan 29, 2009, 8:20:06 PM1/29/09
to
Am Donnerstag, 29. Januar 2009 schrieb Athunye:
>
> I have Debian Etch with Samba.
> I windows clients I do not get any errors when move files to the /mnt/videos
> on the server.
> However n Linux clients I do get some errors. (Using rox-filer or the mv
> command-line).
>
> This are the errors:
> bash >>> mv post.txt share/
> mv: preserving times for `share/post.txt': Invalid argument
> mv: setting permissions for `share/post.txt': No such file or directory
>
> Notice that if I cp I do not get those errors.
>
> http://pastebin.com/f32cd160a Here is the pastebin of the server
> /etc/samba/smb.conf and the /etc/fstab of the Linux client.
>
> Also:
> ls -l /mnt/drwxr-xr-x 2 root nando 4096 2009-01-26 22:56 videos
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21712791.html
> Sent from the Samba - General mailing list archive at Nabble.com.
>

what version of cifs vfs (i assume you use it for mounting on the clients) are you
using on your "n Linux clients" which are not working correctly?
Please post the outcome of 'modinfo cifs' done on your failing linux clients.

Cheers, Günter

Athunye

unread,
Jan 29, 2009, 8:40:06 PM1/29/09
to

bash >>> modinfo cifs
filename: /lib/modules/2.6.18-6-686/kernel/fs/cifs/cifs.ko
author: Steve French <sfr...@us.ibm.com>
license: GPL
description: VFS to access servers complying with the SNIA CIFS
Specification e.g. Samba and Windows
version: 1.45
vermagic: 2.6.18-6-686 SMP mod_unload 686 REGPARM gcc-4.1
depends:
srcversion: 7AD39A7ABC43BFDBC841ACC
parm: cifs_max_pending:Simultaneous requests to server. Default:
50 Range: 2 to 256 (int)
parm: cifs_min_small:Small network buffers in pool. Default: 30
Range: 2 to 256 (int)
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to
64 (int)
parm: CIFSMaxBufSize:Network buffer size (not including header).
Default: 16384 Range: 8192 to 130048 (int)

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21739946.html


Sent from the Samba - General mailing list archive at Nabble.com.

--

rob....@gmail.com

unread,
Jan 29, 2009, 9:00:07 PM1/29/09
to
With the 'valid users = smbuser' directive, all users will be logging in as guest. Note that when you use 'cp' the copies end up being owned by smbuser. But smbuser can't change the datestamp of files it doesn't own -- the server's OS won't allow it. That's likely the cause of your problem.

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21739237.html

Günter Kukkukk

unread,
Jan 29, 2009, 11:10:07 PM1/29/09
to
Am Freitag, 30. Januar 2009 schrieb Athunye:
>
> bash >>> modinfo cifs
> filename: /lib/modules/2.6.18-6-686/kernel/fs/cifs/cifs.ko
> author: Steve French <sfr...@us.ibm.com>
> license: GPL
> description: VFS to access servers complying with the SNIA CIFS
> Specification e.g. Samba and Windows
> version: 1.45
> vermagic: 2.6.18-6-686 SMP mod_unload 686 REGPARM gcc-4.1
> depends:
> srcversion: 7AD39A7ABC43BFDBC841ACC
> parm: cifs_max_pending:Simultaneous requests to server. Default:
> 50 Range: 2 to 256 (int)
> parm: cifs_min_small:Small network buffers in pool. Default: 30
> Range: 2 to 256 (int)
> parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to
> 64 (int)
> parm: CIFSMaxBufSize:Network buffer size (not including header).
> Default: 16384 Range: 8192 to 130048 (int)
>
> --
> View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21739946.html
> Sent from the Samba - General mailing list archive at Nabble.com.
>

looks like cifs vfs (version 1.45) is failing here.
Do your not _failing_ linux clients use a more recent version of cifs vfs?

Cheers, Günter

Athunye

unread,
Jan 30, 2009, 5:10:07 AM1/30/09
to

All machines are logging in with the user smbuser... I mean, all machines
have the fstab this way:
//192.168.1.1/docs /mnt/docs cifs
noauto,users,username=smbuser,password=******,_netdev,uid=debuser 0 0

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21744472.html

Athunye

unread,
Jan 30, 2009, 5:20:11 AM1/30/09
to

Günter Kukkukk-2 wrote:
>
>
> looks like cifs vfs (version 1.45) is failing here.
> Do your not _failing_ linux clients use a more recent version of cifs vfs?
>
>

I do not have not_failing_linux_clients because I only have four machines
with Debian Etch (wich are updated every two or three days).
--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21744578.html


Sent from the Samba - General mailing list archive at Nabble.com.

--

Athunye

unread,
Jan 30, 2009, 6:10:11 AM1/30/09
to

Also, I have something else to ask. I was talking to someone in #samba
(freenode) and I was told that "cifs isn't posix".
Also: "it's trying to set posix permissions on a filesystem that isn't posix
capable".

What do guys have to say about that ?
--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21745257.html

Günter Kukkukk

unread,
Jan 30, 2009, 1:10:09 PM1/30/09
to
Am Freitag, 30. Januar 2009 schrieb Athunye:
>
> Günter Kukkukk-2 wrote:
> >
> >
> > looks like cifs vfs (version 1.45) is failing here.
> > Do your not _failing_ linux clients use a more recent version of cifs vfs?
> >
> >
>
> I do not have not_failing_linux_clients because I only have four machines
> with Debian Etch (wich are updated every two or three days).
> --
> View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21744578.html
> Sent from the Samba - General mailing list archive at Nabble.com.
>

cifs vfs around version 1.45 had issues when setting file times and permissions
(and a mv cmd is preserving the original settings).

Can you please try the "preserving copy cmds":
'cp -p srcfile /mounted/samba/share/'
'cp -a srcfile /mounted/samba/share/'

Do they work ?
Cheers, Günter

Athunye

unread,
Jan 30, 2009, 2:50:10 PM1/30/09
to

Günter Kukkukk-2 wrote:
>
>
> Can you please try the "preserving copy cmds":
> 'cp -p srcfile /mounted/samba/share/'
> 'cp -a srcfile /mounted/samba/share/'
>
> Do they work ?
>
>

bash >>> pwd
/mnt/docs

bash >>> ls --all
. .. .Trash-1001

bash >>> cp -p ~/test.txt ./
cp: preserving times for `./test.txt': Operation not permitted

bash >>> cp -a ~/.vimrc ./
cp: preserving times for `./.vimrc': Operation not permitted

bash >>> pwd
/mnt/docs

bash >>> rm .vimrc
(no warnings)

bash >>> rm test.txt
rm: remove write-protected regular empty file `test.txt'?

--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21754249.html


Sent from the Samba - General mailing list archive at Nabble.com.

--

Günter Kukkukk

unread,
Jan 30, 2009, 8:20:06 PM1/30/09
to
Am Freitag, 30. Januar 2009 schrieb Athunye:
>
> Günter Kukkukk-2 wrote:
> >
> >
> > Can you please try the "preserving copy cmds":
> > 'cp -p srcfile /mounted/samba/share/'
> > 'cp -a srcfile /mounted/samba/share/'
> >
> > Do they work ?
> >
> >
>
> bash >>> pwd
> /mnt/docs
>
> bash >>> ls --all
> . .. .Trash-1001
>
> bash >>> cp -p ~/test.txt ./
> cp: preserving times for `./test.txt': Operation not permitted
>
> bash >>> cp -a ~/.vimrc ./
> cp: preserving times for `./.vimrc': Operation not permitted
>
> bash >>> pwd
> /mnt/docs
>
> bash >>> rm .vimrc
> (no warnings)
>
> bash >>> rm test.txt
> rm: remove write-protected regular empty file `test.txt'?
>

that's what i've expected.
These cifs vfs bugs have been fixed in a later kernel release.
I was able to test that on a (somewhat more recent kernel than
yours) 2.6.22.18-0.2, which was shipped with cifs vfs version 1.49.
The 'mv' and 'cp -p' problems are fixed in there.

Btw - you can also expect cp -p errors, when ACLs are used and
the remote samba server is exporting a share on a *file system*
which does not support ACLs - or is not configured to do so.
(e.g. ext3 can be mounted with the "acl,user_xattr" option).
On the cifs client side one can use the cifs mount option "noacl"
to disable acls.

So i can only recommend to update the kernels on your linux clients.
Good luck! :-)

Cheers, Günter

Athunye

unread,
Jan 30, 2009, 9:10:13 PM1/30/09
to

Günter Kukkukk-2 wrote:
>
>
> that's what i've expected.
> These cifs vfs bugs have been fixed in a later kernel release.
> I was able to test that on a (somewhat more recent kernel than
> yours) 2.6.22.18-0.2, which was shipped with cifs vfs version 1.49.
> The 'mv' and 'cp -p' problems are fixed in there.
>
> Btw - you can also expect cp -p errors, when ACLs are used and
> the remote samba server is exporting a share on a *file system*
> which does not support ACLs - or is not configured to do so.
> (e.g. ext3 can be mounted with the "acl,user_xattr" option).
> On the cifs client side one can use the cifs mount option "noacl"
> to disable acls.
>
> So i can only recommend to update the kernels on your linux clients.
> Good luck! :-)
>
>

We use Fluxbox with Rox-filer in the machines. I tried to install Gnome and
with Nautilus it seems that the cp/mv warnings won't show up.

I'll follow your tips about ACLs and mount options.
I'm not sure whether I'm going to upgrade the kernel or not. (I'd have to
upgrade Etch to Lenny.)

Thanks a lot for your help, time and patience. (everyone)


--
View this message in context: http://www.nabble.com/mv-errors.-tp21712791p21759003.html


Sent from the Samba - General mailing list archive at Nabble.com.

--

Harry Jede

unread,
Jan 31, 2009, 5:50:07 AM1/31/09
to
Am Samstag, 31. Januar 2009 03:06 schrieb Athunye:
> Günter Kukkukk-2 wrote:
> > that's what i've expected.
> > These cifs vfs bugs have been fixed in a later kernel release.
> > I was able to test that on a (somewhat more recent kernel than
> > yours) 2.6.22.18-0.2, which was shipped with cifs vfs version 1.49.
> > The 'mv' and 'cp -p' problems are fixed in there.
> >
> > Btw - you can also expect cp -p errors, when ACLs are used and
> > the remote samba server is exporting a share on a *file system*
> > which does not support ACLs - or is not configured to do so.
> > (e.g. ext3 can be mounted with the "acl,user_xattr" option).
> > On the cifs client side one can use the cifs mount option "noacl"
> > to disable acls.
> >
> > So i can only recommend to update the kernels on your linux
> > clients. Good luck! :-)
>
> We use Fluxbox with Rox-filer in the machines. I tried to install
> Gnome and with Nautilus it seems that the cp/mv warnings won't show
> up.
>
> I'll follow your tips about ACLs and mount options.
> I'm not sure whether I'm going to upgrade the kernel or not. (I'd
> have to upgrade Etch to Lenny.)
Try the etchnhalf Kernel 2.6.24+* first.

I believe this kernel is in "etch-proposed-updates" Repository

> Thanks a lot for your help, time and patience. (everyone)
>
>
> --
> View this message in context:
> http://www.nabble.com/mv-errors.-tp21712791p21759003.html Sent from
> the Samba - General mailing list archive at Nabble.com.

--

Gruss
Harry Jede

0 new messages