opensuse: cifs: unable to change file permissions (file_mode) from 555 to 777

Hi,
we do copy files from a opensuse-server with sles 11.1 or opensuse 11.4 on it to a Windows 2003 Server.
If the file on the linux side has the permission 222, 333,666 it will be changed to 777 on the target directory.
If the file has the permission 444 or 555 it will have 555 on the target directory.

This is not what I want. These files shall get 777 like the others.

The row at /etc/fstab is like the following:
//192.168.178.1/PATH /mnt/PATH cifs credentials=/fstab-cred-admin.txt,file_mode=0777,dir_mode=0777,iocharset=iso8859-15 0 0

sles 11.1:

  • cifs and samba:version 3.4.3-1.19.1
    opensuse 11.4:
  • cifs-utils: Version 4.6
  • samba: 3.5.7

umask says 0022.

Thanks for a hint.
Kind regards.

If it’s not a bug on the MS side, then you need to look for some routine that’s changing the 0333 to 0777 modes.

Hi tararpharazon,

thanks for this hint. You are talking about a workaround.
This is a possible solution. At the moment we do think about this:

  • copy the files into a local path
  • change the permissions
  • then moving to the target path.

or
after each copy the permissions have to be changed to 777.

Deep in myself I expected an answer like: It is not possible to change permissions with cifs if the user who is doing the job has no rights to write into the file.

My hope was:
Hey frankpaeff, you are the xxx who made this mistake. Please change “here and there” and then it will work.:wink:

Kind regards
frankpaeff

PS: At the moment the job is done by suse 10.1. There it works fine.

Are these users mapped to different groups 222, 333s in grp!A 444, 555 in grpB or user map ?