View previous topic :: View next topic |
Author |
Message |
kvap n00b
Joined: 16 May 2008 Posts: 4
|
Posted: Fri May 16, 2008 8:47 pm Post subject: cifs - cannot write to newly created files/dirs |
|
|
I mount a windows share this way (fstab):
Code: |
//10.0.0.110/share /mnt/share cifs auto,username=smb_user,password=123,uid=root,gid=users,codepage=866,dir_mode=0770,file_mode=0660,sync 0 0
|
After mounting there are correct owners/permissions on already existing files:
Code: |
$ pwd
/mnt/share
$ ls -l
drwxrwx--- 1 root users 0 Май 17 2008 asd
|
But:
Code: |
$ mkdir dsa; ls -l
итого 0
drwxrwx--- 1 root users 0 Май 17 2008 asd
drwxr-xr-x 2 root users 0 Май 17 2008 dsa
|
So I cannot, for example, copy a directory with files to this share - the directory is created, but with r-x permissions for group 'users' until remounting.
I can change my umask and then it works fine:
Code: |
$ umask 007; mkdir okay; ls -l
итого 0
drwxrwx--- 1 root users 0 Май 17 2008 asd
drwxr-xr-x 2 root users 0 Май 17 2008 dsa
drwxrwx--- 2 root users 0 Май 17 2008 okay
|
Bit I don't want to create all my files, even outside this share, with umask 007.
Is there a way to specify umask for this share that will override user's umask?
Tried to set it in fstab,
Code: |
//10.0.0.110/share /mnt/share cifs auto,username=smb_user,password=123,uid=root,gid=users,codepage=866,dir_mode=0770,file_mode=0660,sync,umask=007 0 0
| , but this changed nothing. |
|
Back to top |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Sat May 17, 2008 4:53 am Post subject: |
|
|
Set the file mask in the sambe config, not in the mount option. |
|
Back to top |
|
|
kvap n00b
Joined: 16 May 2008 Posts: 4
|
Posted: Sun May 18, 2008 9:13 am Post subject: |
|
|
I thought the only config for mount.cifs are the mount options... |
|
Back to top |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Sun May 18, 2008 10:34 am Post subject: |
|
|
oh, I mean the /etc/samba/smb.conf in the samba server. |
|
Back to top |
|
|
kvap n00b
Joined: 16 May 2008 Posts: 4
|
Posted: Mon May 19, 2008 5:16 am Post subject: |
|
|
The server is Windows |
|
Back to top |
|
|
javeree Guru
Joined: 29 Jan 2006 Posts: 455
|
|
Back to top |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Mon May 19, 2008 8:41 am Post subject: |
|
|
Try Code: | //10.0.0.110/share /mnt/share cifs auto,username=smb_user,password=123,uid=root,gid=users,codepage=866,dir_mode=0770,file_mode=0660,directio 0 0 |
|
|
Back to top |
|
|
kvap n00b
Joined: 16 May 2008 Posts: 4
|
Posted: Tue May 20, 2008 9:02 pm Post subject: |
|
|
junksiu, this didn't help.
javeree, Windows is Pro 64bit, but situation looks extremely same.
I also tried mounting a share of another server - under Gentoo.
Here are fragments of smb.conf on it:
Code: |
...
[sandbox]
comment = The Sandbox
path = /home/sandbox
valid users = @smb_sandbox
public = no
writable = yes
printable = no
create mask = 0770
force create mode = 0770
directory mask = 0770
force directory mode = 0770
...
|
Code: |
...
[global]
unix extensions = no
...
|
The result the same.
On client:
Code: |
$ mount.cifs --version
mount.cifs version: 1.10
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|