Solved

Users problem in Samba Server

Posted on 1998-12-03
7
265 Views
Last Modified: 2010-04-20
I have a Samba Server in Redhat 5.1, when a user create a file, this one has 755 mode. In the smb.conf i have this to be 777, but it doesn't work. I think this must be the umask for every user, but no one has bashrc in their directories.
What happened?
0
Comment
Question by:crojas
7 Comments
 
LVL 2

Expert Comment

by:Neogenix
ID: 1638710
On a Unix server, the highest mode you can give a file when it is created is 666.
Your umask value will then be 000.

Good luck.
0
 
LVL 1

Author Comment

by:crojas
ID: 1638711
On a Unix server, the highest mode you can give a file when it is created is 777.
rwx = 111b -->7d  
    Your umask value will then be 000.   ----> i know that.

How do i change the umask for every samba user to 000 or 007.
0
 
LVL 2

Expert Comment

by:vx
ID: 1638712
I think I misunderstood your question, but I can always try:
if you access shares on a Samba server, you don't use a shell to login, so .bashrc shouldn't have anything to do with it.
Add a new entry in smb.conf to the [homes] section, or to the section you want to modify:
add: "create mask = 777". It should work, if it doesn't you probably didn't add it to the right section.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Author Comment

by:crojas
ID: 1638713
It's supossed that that line goes in the directory definition, but it doesn't work, that's my problem
0
 
LVL 2

Expert Comment

by:vx
ID: 1638714
The directory section? Do you use Samba 2 or 1.9? Samba 2 is still in development. The (my?) example configuration file lists a line that says "create mask = 777". I believe it should work in for example the [homes] section. I don't know a section called directory, but perhaps I misunderstood you.
0
 
LVL 1

Expert Comment

by:zblaxell
ID: 1638715
You can also put 'create mask = 777' in the top of smb.conf in the global section, where it will affect all shares.

There is a separate 'directory mode' parameter for directories (as opposed to files).

You might have better luck with 'force create mode', or a combination of 'force create mode' and 'create mode'.  The manual states that one is ANDed with the permissions of the file and the other is ORed.  It also implies that there is some DOS -> Unix permissions mapping which might only extend as far as '755' permissions.
0
 

Accepted Solution

by:
rsurratt earned 100 total points
ID: 1638716
i had same problem.

put the following three lines in /etc/rc.d/rc.local (script executed last at bootup).

umask 000
mount /dev/hda6/bkup
umask 002

all directories and files are accessible by anyone on partition hda6.  umask is returned to 002 for security after that.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Fine Tune your automatic Updates for Ubuntu / Debian
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question