[Samba] Setting permissions on a file

Henrik Magnusson henrik.magnusson at hiq.se
Wed Mar 20 11:19:04 GMT 2002


Hi!

First of all I hope this is the correct list for this post. For the past few
days I've been looking for help regarding the following problem, but I've
not found anything.

I've got a problem which bothers me a lot. I can't set permissions from a
Windows 2000 machine. I'm running SAMBA v2.2.1a on a RH7.2 machine.

I can create files and almost everytime they get the permissions that I want
it to have.

Example 1:
I create a new file on the homes share, the file will get the following
permisions: -rw-rw-r-- I think I should get the -rwxrwxrwx permission.
Shouldn't it?
I create a directory on the same share, it will get the permission:
drwxrwxr-x which is correct!

Example 2: I create a file on the dummy share. It will get the -rwxrwxr--
share which is correct. I create a directory on the dummy share, it will
also get the correct permissions.

If I then try to change the permissions it behaves very strange. Sometimes I
can change the permissons, and sometimes the permissons are grey out. The
same goes for DOS permissions.

Example 3: On the homes share I can set the dos readonly tag on a file, and
it will update the correct unix settings (-r--r--r--). If I instead select
the security tab, then all permissions are greyed out. If I try to make the
same on a directory then the permission will get drwxr-x-r-x which I don't
think is sufficient.

Example 4: On the dummy share I can't set the dos readonly tag on a file. If
I check Apply it seems as if it worked. But the unix permissions are not
updated. The same for directorys. If I select the security tab then all
boxes are possible to select, but if I deselect and press apply the orginal
settings will be restoed. If I try to to this on a file, it will not make
the settings that I would, instead it removes all group and world
permissions so what ever change I make I'll get the -rwx------ permission.

Here is an extract from the smb.conf
global]
    workgroup = WRKGRP
    netbios name = LINUXSERV
    server string = Samba Server
    security = DOMAIN
    encrypt passwords = Yes
    password server = *
    log file = /var/log/samba/%m.log
    max log size = 0
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    dns proxy = No
    create mask = 0770
    hosts allow = 10.0.4.
    printing = lprng

[homes]
    comment = Home Directories (not accessable)
    path = /home/%u
    valid users = user4,user5
    read only = No
    create mask = 0777
    directory mask = 0775
    browseable = No

[dummy]
    comment = dummy projektet
    path = /home/dummyhome
    valid users = user1,user2,user3,user4
    force group = group1
    read only = No
    create mask = 0774
    directory mask = 0777

All users accessing dummy share are included in the unix group group1, there
is no such group on the Windows PDC. Is that necessary?

So what I want is the possibility to change permissions on a file. And I
want it to get the same permissions every time. I can't see any trouble with
my smb file. Can you?

/Nenne





More information about the samba mailing list