Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
09-25-2005, 01:30 PM
|
#1
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Rep:
|
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
|
|
|
09-25-2005, 06:31 PM
|
#2
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
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!
|
|
|
09-25-2005, 06:59 PM
|
#3
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
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.
|
|
|
09-25-2005, 07:32 PM
|
#4
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
hey thanks but still the folder permissions do not hold
given time they disappear back to default read exec.
rats
thanks
|
|
|
09-25-2005, 07:58 PM
|
#5
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
maybe get rid of that security = share line? something in windows might be overriding and borking it (or change it to user level security).
|
|
|
09-25-2005, 10:21 PM
|
#6
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
made changes held for about an hour the bleep... default
sorry
I dont' know what to do now fersur
|
|
|
09-25-2005, 11:13 PM
|
#7
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
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
|
|
|
09-25-2005, 11:21 PM
|
#8
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
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.
|
|
|
09-25-2005, 11:31 PM
|
#9
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
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
|
|
|
09-26-2005, 12:01 AM
|
#10
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
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
|
|
|
09-26-2005, 12:29 AM
|
#11
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
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
|
|
|
09-26-2005, 07:31 AM
|
#12
|
LQ Newbie
Registered: Sep 2005
Location: NC
Posts: 8
Original Poster
Rep:
|
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
|
|
|
09-26-2005, 10:25 AM
|
#13
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Rep:
|
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 05:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|