Help - Search - Members - Calendar
Full Version: Samba - Read Only
Linuxhelp > Support > Technical Support
RHG
I'm using Samba and when I create a new file other user can only access it as a read only file. I have to do a chmod -R 755 command to fix it. I tried change the create mask to 755 but that still didnt work.

Please help thanks

# Global parameters
[global]
workgroup = RHGREEN
netbios name = CFS
server string = Server
encrypt passwords = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %nn *ReType*new*UNIX*password* %nn
unix password sync = Yes
log level = 2
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = wins bcast lmhosts hosts
time server = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
domain admin group = @admins
logon script = netlogon.bat
logon path = \%Lprofiles%U
logon drive = h:
logon home = \%L%U
domain logons = Yes
os level = 64
preferred master = Yes
domain master = Yes
create mask = 0755
hosts allow = 127.0.0.1 192.16
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
domain admin group = @admins
logon script = netlogon.bat
logon path = \%Lprofiles%U
logon drive = h:
logon home = \%L%U
domain logons = Yes
os level = 64
preferred master = Yes
domain master = Yes
create mask = 0755
hosts allow = 127.0.0.1 192.168.1.0/255.255.255.0

[homes]
comment = Home Directories
read only = No
browseable = No

[profiles]
path = /home/samba/profiles
read only = No
only user = Yes
browseable = No

[netlogon]
comment = Network Logon Service
path = /home/netlogon
write list = @admins
browseable = No

[shared]
path = /home/share
read only = No



: unsure.gif
hughesjr
755 means only the file owner can access the file created in write mode (rwxr-xr-x).... 766 (rwxrw-rw-) or 777(rwxrwxrwx) would allow everyone to access the file in read/write mode ... and 764 (rwxrw-r--) or 774 (rwxrwxr--) would allow only members of the creators group to have read/write permissions.

You also have several items repeated in the Global section ... each entry should be there only once...

Also, check what the linux users umask is ... use the command umask when logged into the linux machine (from a terminal window) as that user...

the output needs to be 0002 (not 0022) if you want to have the user create files readable by others in his group, or 0000 if you want the user to create files readable by everyone...

You can set umask in the file .bashrc with this command:

umask=0002

or

umask=0000
RHG
I checked the umask and it was 0022. But I'm not clear on how to change the settings.

How do I set umask in the file .bashrc?
RHG
I got it fixed, I made a dumd error
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.