we have a old server with opensuse 10.1 and samba 3.0.22 installed.
There we are able to copy files from itself to a windows 2003 Server and the file permissions will be changed to 777. This change does not depend on the permissions the files have on the source server.
permission 222 will be changed to 777
permission 555 will be changed to 777.
This works fine.
Now we have a new server with sles 11.1 sp1 and samba 22.214.171.124-19.1 installed.
Files with the permission 222,333,666 get new permission 777 after being copied.
Files with the permission 444 or 555 don´t get any permission-change after being copied. This is what we don´t want. These permissions shall be changed automatically too.
We have tried using the smbfstab and the /etc/fstab.
Both types of entry gave the same result.
Here is the row at the /etc/fstab:
//192.168.178.1/path /mnt/server_path cifs credentials=/etc/fstab-cred-admin.txt,noperm,file_mode=0777,dir_mode=0777,iocharset=iso8859-15 0 0
The user admin belongs to the admin-group at the w2k3 server.
We have tested this with opensuse 11.4 too. Same result.
Hopefully being at the right position.
Thanks for a hint.
The client maps the DOS readonly bit to the inverse of the write permission bit. IOW, when the r/o bit is set on the file, the client will clear any write permission bits.
What confuses me a little is that you state:
"Files with the permission 444 or 555 don´t get any permission-change after
...so given your mount options, the fact that 0555 permissions don't change is expected. 0444 however should change to 0555. Is that also not happening here?
Also, I'm not that familiar with SuSE versioning. Can you tell me what kernel versions you're working with?
The result is:
-rwxrwxrwx 1 root root 0 Mar 22 15:17 222*
-r-xr-xr-x 1 root root 0 Mar 22 15:17 444*
-r-xr-xr-x 1 root root 0 Mar 22 15:17 555*
-rwxrwxrwx 1 root root 0 Mar 22 15:21 666*
-rwxrwxrwx 1 root root 0 Mar 22 15:21 777*
You are right. 444 changes to 555, as you expected.
The linux and kernel:
Linux server 126.96.36.199-0.3-default #1 SMP 2011-02-25 13:36:59 +0100 x86_64 x86_64 x86_64 GNU/Linux
Is there any possibility to change the permissions from 444 and 555 to 777 by changing any configuration
Is it possible to change any config so that 444 and 555 will be changed to 777 too?
Thanks in advance
Not currently, no. The DOS read-only bit is mapped this way unconditionally. I suppose you could add yet another mount option to give you the behavior you want, but I'm a bit reticent to suggest that since this seems like a very specialized use case.
we have tried a lot of different mount options. Nothing worked. It was equal which user was used or which file_mode was given.
555 is unchanged today.
Would it be possible to use an old version of samba with the old smbmount?
Like we use it up to now at the old linux (samba 3.0.22)?
(In reply to comment #4)
> Would it be possible to use an old version of samba with the old smbmount?
> Like we use it up to now at the old linux (samba 3.0.22)?
cc'ing Suresh since you mention you're using SuSE. I'm not sure I understand your question...
smbmount is for smbfs. cifs doesn't use that. Switching to an older mount.cifs won't help this as this is all handled by the kernel. Switching to smbfs might give you what you want but it's more or less deprecated in more recent kernels.
Sorry if I wasn't clear before, when I said "you could add another mount option", I meant that you (or someone) could do a patch to add such a mount option to the code.
Sorry about the delay in catching up. If I understand the problem and Jeff's response correctly, the behavior exhibited by SLES11 cifs is the expected one.
This is surely a specialized way of using CIFS and it is not clear why such mapping would be beneficial in real world scenario. If we can find the scenario compelling and useful we could think of implementing it and see what the CIFS community's take on this.
this behavior does not belong to SLES 11.1. We have checked it with suse 11.3, 11.4 and Ubuntu 10.04 - all the same.
If the user at his unix-side says file_mode=0777 then he expects that all the files get 0777.
I can not see a special use here.
It would be very useful if there is a option to handle this.
No patch has materialized to change this, and I don't forsee anyone doing
one in the future, so I'm going to go ahead and close this WONTFIX. If you
want to propose such a patch, it's probably best discussed on email@example.com.