LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-25-2005, 12:30 PM   #1
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Rep: Reputation: 0
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
 
Old 09-25-2005, 05:31 PM   #2
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
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!
 
Old 09-25-2005, 05:59 PM   #3
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
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.
 
Old 09-25-2005, 06:32 PM   #4
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
hey thanks but still the folder permissions do not hold

given time they disappear back to default read exec.

rats

thanks
 
Old 09-25-2005, 06:58 PM   #5
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
maybe get rid of that security = share line? something in windows might be overriding and borking it (or change it to user level security).
 
Old 09-25-2005, 09:21 PM   #6
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
made changes held for about an hour the bleep... default


sorry

I dont' know what to do now fersur
 
Old 09-25-2005, 10:13 PM   #7
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 09-25-2005, 10:21 PM   #8
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
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.
 
Old 09-25-2005, 10:31 PM   #9
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 09-25-2005, 11:01 PM   #10
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 46
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
 
Old 09-25-2005, 11:29 PM   #11
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 09-26-2005, 06:31 AM   #12
xzerros
LQ Newbie
 
Registered: Sep 2005
Location: NC
Posts: 8

Original Poster
Rep: Reputation: 0
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 ! !

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
 
Old 09-26-2005, 09:25 AM   #13
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba password protected shared Folder Mrpeepers310 Linux - Networking 5 09-18-2010 10:04 AM
SAMBA Public Share Folder Echo Kilo Linux - Software 3 06-17-2008 01:32 AM
Samba Public Folder Permissions decoone Linux - Networking 4 09-26-2007 12:42 AM
shared folder permissions for SFTP jawilson Linux - Networking 1 07-07-2005 02:42 PM
Samba Public Folder DerrickCheang Linux - Newbie 3 10-29-2002 06:04 AM


All times are GMT -5. The time now is 11:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration