Samba Public shared Folder will not hold permissions
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.