-   Linux - Networking (
-   -   Samba Public shared Folder will not hold permissions (

xzerros 09-25-2005 01:30 PM

Samba Public shared Folder will not hold permissions

I am trying to set up a “public” file server on my local network.

I have the smb.conf file as below and have created a folder on the /home for /Share the shared folder. (copied below)

However, it will not hold permissions.

I can manually set the permissions to 777 and it works as I want but given a few minutes of time, or any change such as a reboot or even logging out as root it drops the 777 and goes to where I can only read or execute not write to or change anything in the share folder.

I need it to have full access for everyone!

Thanks in advance for any help.


I'm a little frustrated with it I know it is a simple thing but can't get it to hold for any amount of time.


#workgroup = NT-Domain-Name or Workgroup-Name
workgroup = (network_name)

#server string is the equivalent of the NT Description field
security = SHARE
guest ok = yes
server string = *name of server*
share modes = yes
status = yes

path = /home/Share
writable = yes
guest ok = yes
public = yes
force create mask 0777
force directory mask 0777
force create mode 0777
force directory mode 0777
browseable = yes

path = /home/john
writeable = yes
guest ok = yes

xzerros 09-25-2005 06:31 PM


I have changed the 777 permissions to 757 permsissions but still the folder /Share does not hold the permsission settings they default back to read and execute only.

I have the system set exactly as I need it and this one thing is holding me from using it.


understand my frustration,

any help anyone can give GREATLY appreciated!:study:

slackhack 09-25-2005 06:59 PM

maybe just try plain old:

create mask = 0777
directory mask = 0777


it also seems that you are missing the = signs, but i don't know if that matters or not. the standard way to write it seems to be to include them, though, fwiw.

xzerros 09-25-2005 07:32 PM

hey thanks but still the folder permissions do not hold

given time they disappear back to default read exec.



slackhack 09-25-2005 07:58 PM

maybe get rid of that security = share line? something in windows might be overriding and borking it (or change it to user level security).

xzerros 09-25-2005 10:21 PM

made changes held for about an hour the bleep... default


I dont' know what to do now fersur

xzerros 09-25-2005 11:13 PM

Ok let's forget samba shares

I have created a folder in the /home directory and reset permissions on it but not set up in samba share

seems the folders are not holding their permissions even stand alone.

any one have any clue as to why a folder would not hold permissions?


slackhack 09-25-2005 11:21 PM


Originally posted by xzerros
Ok let's forget samba shares

I have created a folder in the /home directory and reset permissions on it but not set up in samba share

seems the folders are not holding their permissions even stand alone.

any one have any clue as to why a folder would not hold permissions?


that sounds kind of weird. can you be more specific about exactly what you did? e.g., made a directory in home called testing123, set the permissions to chmod xxx, the permissions changed to drwxr--r--, etc.

xzerros 09-25-2005 11:31 PM


created a folder in /home /home/Files my test folder

set permission on it to 757 rwxr-xrwx and 777 of course rwxrwxrwx

in about an hour or so both samba folder /home/Share and test folder /home/Files

rwxr-xr-x can't write to the folder from samba share in that permission.
hope this is what you were asking.

I'm puzzled as to why the folders will not hold permissions that are manually set

slackhack 09-26-2005 12:01 AM

btw, what distro are you using? i found something on google about permissions being reset in SuSE according to the /etc/permissions file (, but i'm guessing it can also happen in other "gui setup" distros like fedora or mandrake, like when it asks what security level you want (as i vaguely remember mandrake and redhat asking from when i used them a long time ago). i bet if you run # crontab -l or check your /etc/cron.hourly directory you might find something related to what's happening. i really know nothing about that sort of thing so i can't be much more help to you, but i'm guessing it has something to do with executing some sort of automatic security policy like described in that link with the /etc/permissions file. there's no other explanation for what you're describing that i can think of, unless maybe you were hacked, which it doesn't sound like at all. gl :)

xzerros 09-26-2005 12:29 AM

You are right about me using Mandrake, I like some of the tools in it just call me someone who likes more control

on the cron hourly and corn daily I found a file name msec file

contents to follow:

but I have backed up the file and recorded permissions for it. Then deleted the file from both locatiosn /hourly /daily

I have no clue what this program does, but after deleting it time will tell. I have no where else to go so I have nothing to loose.

thanks for all your advise. it is much apreciated.

strange how simple things a blatent file server can become so complicated.

oh and no hack I've two firewalls on my Dsl router(s) my dsl provider provides a modem/router an then I added a linksys for wireless. so I run through two routers both firewalled.

many thanks

# Project : Mandrake Linux
# Module : share
# File : msec
# Version : $Id: msec,v 1.4 2002/03/06 04:11:41 flepied Exp $
# Author : Frederic Lepied
# Created On : Thu Dec 13 11:36:50 2001
# Purpose : entry script to run hardness script or change
# the security level.


function cleanup() {
rm -f $LCK

if [ -f $ LCK ]; then
if [ -d /proc/`cat $LCK` ]; then
exit 0
rm -f $LCK

echo -n $$ > $LCK

trap cleanup 0


for a in "$@"; do
if [ "$a" = '-o' ]; then
OPT="$OPT -o"
if [ "$NEXT" = 1 ]; then
OPT="$OPT $a"


if [ -n "$last" ]; then
case "$last" in
[0-5]) ;;
*) [ -x /usr/share/msec/$ ] && MSEC=/usr/share/msec/$;;
# no args so try to guess if a custom msec is needed
. /etc/sysconfig/msec

case "$SECURE_LEVEL" in
[0-5]) ;;
*) MSEC=/usr/share/msec/$;;

if [ ! -x "$MSEC" ]; then
echo "$MSEC found or not executable. Aborting" 1>&2
exit 1

if $MSEC "$@"; then
. /etc/sysconfig/msec


[ -f /etc/security/msec/perm.local ] && LOCAL=/etc/security/msec/perm.local

/usr/share/msec/ $OPT /usr/share/msec/perm.$PERM_LEVEL $LOCAL

# msec ends here

xzerros 09-26-2005 07:31 AM

Hey Slack

just thought I'd let you know after deleting that file it held permissions overnight.

I set one file to 777 left one alone and set another to 757 and they are still like I set them this morn.

I'm going to set them for all for 777 through out and see if they hold throughout the day

Thanksamillion I'd never have thought to look in cron without your help ! ! :cool:

who would have thought they'd have put something in there like that I don't understand why but that is beside the point

Hey thanks for the wonderful support!


FliesLikeABrick 09-26-2005 10:25 AM

easy fix. i had the same thing:

in the [section] for this share in your samba config file, put:

force create mode = 777
force directory mode = 777

for example, here is my configuration for my media share:

force create mode = 777
force directory mode = 777
comment = Media Drive
path= /mnt/external250
read only = no
public = yes
writeable = yes

All times are GMT -5. The time now is 04:50 AM.