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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-28-2004, 12:21 PM
|
#1
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Rep:
|
Permissions of new folders through samba
We use samba at work to share files from a server machine to machines running Linux and Windows. It works great but if a user creates a new folder, they cannot then write to it without someone sshing into the server and changing the folders permissions.
Can anyone tell me how to configure samba to allow users to write to directories that they have created?
|
|
|
|
07-28-2004, 06:49 PM
|
#2
|
|
Member
Registered: Mar 2004
Posts: 50
Rep:
|
in your smb.conf file, add this line under the share section:
create mask = 0765 (or whatever mask you want)
|
|
|
|
07-29-2004, 01:03 AM
|
#3
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Original Poster
Rep:
|
How do I know what mask I want? and what am I tellling it to do?
|
|
|
|
07-29-2004, 10:21 AM
|
#4
|
|
Member
Registered: Mar 2004
Posts: 50
Rep:
|
the mask is a octal 3bit setting where it has the opposite effect of chmod permissions. If you do a chmod 777 then it gives rwx, in a mask if you set it to 777 then it removes all three (like a chmod 000). If you set your mask to 222, then it effectivly gives a chmod 555. You will probably want to tinker with it a while to get it the way you want.
|
|
|
|
07-29-2004, 01:38 PM
|
#5
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Original Poster
Rep:
|
Thanks for the help. But I'm still struggling.
I've edited /etc/samba/smb.conf. I picked a share and added create mask = 0000 (figuring this would act like doing a chmod 777). I restarted samba and from a remote machine created a folder, moved into the folder and tried to create a text document and got the error "Access Denied, could not write to .................".
Have a done something wrong should there be a section labelled "share" or do you put the line into the individual shares?
|
|
|
|
07-29-2004, 02:32 PM
|
#6
|
|
Member
Registered: Mar 2004
Posts: 50
Rep:
|
put it into the individual shares. Take a look at the actual folder that was created. do an ls -l and it will show you the permissions on the folder.
[user1]
your config here
create mask = 0000
[user2]
your config here
create mask = 0000
|
|
|
|
07-30-2004, 01:02 AM
|
#7
|
|
Member
Registered: Apr 2004
Location: M'sia, Aus, Chn
Distribution: Redhat Linux 8 & 9, Fedora Core 2, XP
Posts: 301
Rep:
|
Sorry to interrupt you guys~
Here is the portion of my smb.conf that enables roaming profiles:
Code:
[proflies]
path = /home/samba/profiles
writeable = yes
browseable = no
create mask = 0600
directory mask = 0700
profile acls = yes
What are the masks for? SInce i was working fine so i did not bother to understand what is does, mind explaning a bit?
|
|
|
|
08-02-2004, 08:05 AM
|
#8
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Original Poster
Rep:
|
These are the permissions of the folder I created. With no mask added to smb.conf.
drwxr-xr-x 1 nobody nogroup 0 2004-08-02 13:48 New Folder_3
Then I added this create mask line to my smb.conf file and restated samba:
[reception]
create mask = 0000
comment = Shelter Reception Folders
path = /home/media/My Documents (Networked)/Reception/
read only = No
guest ok = Yes
This is the result:
drwxr-xr-x 1 nobody nogroup 0 2004-08-02 14:03 New Folder
Exactly the same - what am I doing wrong?
|
|
|
|
08-02-2004, 09:26 AM
|
#9
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Original Poster
Rep:
|
Hmmmmmmmmmmm, I just noticed something else weird. If I create a folder on the samba share as root I can write to it but I get this error if I try to delete it (even though it cannot be busy as all I have done is create it an try to delete it immediately):
mainbox:/mnt/reception# mkdir Test
mainbox:/mnt/reception# rm Test/ -fr
rm: cannot remove directory `Test/': Device or resource busy
mainbox:/mnt/reception# exit
|
|
|
|
08-10-2004, 12:46 AM
|
#10
|
|
Member
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117
Original Poster
Rep:
|
Defining a guest account
I'm sorted now (I hope). The problem was that I hadn't specified a guest account. I've now added "guest account = <<UserName>>" to my smb.conf. Changed all the files in the share to be owned by that user and it all seems to be working OK.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:51 PM.
|
|
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
|
|