LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-16-2004, 08:57 PM   #1
trilect
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Rep: Reputation: 0
I need help setting samba share permissions.


I have some directories that I'm sharing with 11 XP machines, I want everyone accessing these directories to be able to create and edit each others files.

I think I need to add a couple lines to my smb.conf file heres one of the share from the conf file:

[proj-projects]
comment = projects
path = /drive2/proj-projects
public = yes
writeable = yes
guest ok = yes


do I just need to add

force create mode = 0777
force directory mode = 0777

to the bottom of all my shares in the smb.conf file?

thanks for any help
 
Old 08-16-2004, 11:18 PM   #2
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Just make sure that your share's directory path has 777 permission. Just execute this as root: #chmod 777 /drive2/pro-projects.

With this permission everyone has full control of this directory.

force directory mode and create mode is used only if you want to limit the permission below 777 when users create files and directory as security measures.

With 777 permission, the owner (the one that created the file or directory) can read. write and access/execute and its group membership (as well as the other member of the group) and the others (which are not the owner nor a member of the owner's group) has the full control (rwx). This a no security policy.

I thought that in Windows the share name is limited only up to 8 characters. Just checking this. This is the reason why a comment field is included that can lenghtelly describe the share and that will Windows hosts will see. Any way if the share can be seen by your windows hosts its okey.

Hope that I'm right? Forgive me trying to help you if it won't work since I'm just a mere newbie like you.

Good day!
 
Old 08-17-2004, 07:40 AM   #3
trilect
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Hey thanks

I did the chmod 777 as you suggested

and I added the force create mode = 777 force directory mode = 777

and it works for the moment hehe

Will I need to do a chmod 777 each time I reboot the server now or will it hold the that setting?

Normally I would have researched the problem myself but I installed this new server 2 days ago thinking I had it just right. Then all the sudden the next day all hades broke loose when no one could modify files created by others.

Last edited by trilect; 08-17-2004 at 07:44 AM.
 
Old 08-17-2004, 08:42 AM   #4
wakeras
LQ Newbie
 
Registered: Oct 2003
Location: Kota Bharu, Malaysia.
Distribution: Slackware 12.0, Debian Lenny
Posts: 10

Rep: Reputation: 0
Hi, As far as I know, when you chmod something, it will stay as it is until you chmod it something else.

Slackers
 
Old 08-18-2004, 06:20 AM   #5
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Its permanent on your magnetic disk. Its not volatile RAM. I agree with Slackers. It will be as what you have done unless somebody amongs you chmod on that.

Just replied today coz I just came from an Open Source conference here and I will be agin attending tomorrow.
 
Old 08-18-2004, 06:57 AM   #6
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Are you just implementing ordinary file sharing with windows? Are your windows hosts can create, delete files and directories with each others shared folders freely?

If so, is your security setting in smb.conf set to share?

It should be as simple as this? I'm not having trouble with this wiht my Slackware 10 with Samba 3.0.4 and configured it as NT Domain.

Try to uncomment [tmp] share within your smb.conf or create one if it has none.

[tmp]
comment = Temporary directory
path = /tmp
read only = no
public = yes

This is just for the sake of testing with your problem for comparison because tmp is a public directory for everyone.

I can reply only on Friday if you incase ask again.
 
Old 08-18-2004, 07:27 AM   #7
trilect
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
It seems to be working fine now Gani.

We use Autocad 2004 to create HVAC, plumbing and electrical drawings.

We might have 60 drawings that everyone has at one time or another worked on sort of like an assembly line.

Believe it or not we used to use plain old windows 98 on our servers for file sharing since it was simple, no logged user limit and cheap, but it was slow, crashed once a week and a person really had to manually edit the registry for best results.

I like Linux very much so far its FAST! Easy to use once you understand the logic of how things work and appears pretty easy to reload in the event of a drastic crash.

Anyway since I did the chmod and the forced mode entries my shared directories are wide open to all in my workgroup.
 
Old 08-18-2004, 09:32 AM   #8
wakeras
LQ Newbie
 
Registered: Oct 2003
Location: Kota Bharu, Malaysia.
Distribution: Slackware 12.0, Debian Lenny
Posts: 10

Rep: Reputation: 0
heheh.... I hope not so wide.


heheheh



Slackers
 
Old 08-18-2004, 08:05 PM   #9
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Thats fine!

I'm here now at the Open Source Conference typing this reply.
 
Old 08-24-2004, 07:48 AM   #10
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
Yes you really need to add force create mode and directory mode since this is a shared directory wide open to everyone. To put some security add a sticky bit on this shared directory. This will prevent other users to delete (accidentally or intended) files and directories not created by them.

as root do this: chmod 1777 /drive2/proj-projects
 
Old 08-24-2004, 07:56 AM   #11
trilect
LQ Newbie
 
Registered: Aug 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks gani I have it working great now.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba share permissions anorman Linux - Software 1 10-22-2005 02:49 AM
samba share permissions? psychomaniac Linux - Software 4 04-29-2004 02:22 PM
samba share permissions keep resetting Red Squirrel Linux - Newbie 0 03-03-2004 08:55 PM
Samba Share Permissions stever Linux - Newbie 4 05-17-2003 02:26 AM
WinXP samba share - permissions? armstrj Linux - General 0 04-08-2002 03:40 AM


All times are GMT -5. The time now is 06:41 AM.

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