LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba Public shared Folder will not hold permissions (https://www.linuxquestions.org/questions/linux-networking-3/samba-public-shared-folder-will-not-hold-permissions-366911/)

xzerros 09-25-2005 12:30 PM

Samba Public shared Folder will not hold permissions
 
Hello,

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.

John


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.



[global]

#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

[Share]
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


[john]
path = /home/john
writeable = yes
guest ok = yes
:study:

xzerros 09-25-2005 05:31 PM

update,

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.

arrr

understand my frustration,

any help anyone can give GREATLY appreciated!:study:

slackhack 09-25-2005 05: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 06:32 PM

hey thanks but still the folder permissions do not hold

given time they disappear back to default read exec.

rats

thanks

slackhack 09-25-2005 06: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 09:21 PM

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


sorry

I dont' know what to do now fersur

xzerros 09-25-2005 10: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?

thanks

slackhack 09-25-2005 10:21 PM

Quote:

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?

thanks

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 10:31 PM

sure

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
default


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-25-2005 11:01 PM

btw, what distro are you using? i found something on google about permissions being reset in SuSE according to the /etc/permissions file (http://forums.suselinuxsupport.de/lo...php/t9449.html), 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-25-2005 11:29 PM

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



#!/bin/sh
#---------------------------------------------------------------
# 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.
#---------------------------------------------------------------

LCK=/var/run/msec.pid

function cleanup() {
rm -f $LCK
}

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

echo -n $$ > $LCK

trap cleanup 0

MSEC=/usr/share/msec/msec.py
OPT=""

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

last="$a"
done

if [ -n "$last" ]; then
case "$last" in
[0-5]) ;;
*) [ -x /usr/share/msec/$last.py ] && MSEC=/usr/share/msec/$last.py;;
esac
else
# 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/$SECURE_LEVEL.py;;
esac
fi

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

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

[ -z "$PERM_LEVEL" ] && PERM_LEVEL=$SECURE_LEVEL

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

/usr/share/msec/Perms.py $OPT /usr/share/msec/perm.$PERM_LEVEL $LOCAL
fi

# msec ends here

xzerros 09-26-2005 06: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!

XZ:)

FliesLikeABrick 09-26-2005 09: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:


[media]
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 03:58 PM.