LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-30-2014, 08:43 AM   #1
dllo
LQ Newbie
 
Registered: Jul 2014
Posts: 3

Rep: Reputation: Disabled
Samba4 creating share and setting permissions without windows tools


Hello,

I need a way to set permissions to share folder without to use RSAT, I've not found anything about that.

The samba wiki said that

---------------------
Change permissions on folders of a share


Changes of permissions are done using the classic *nix tools 'chmod', 'chown' and 'chgrp'.

Example:

Code:
# mkdir /srv/samba/Demo/Example/
# chown foobar:DemoGroup /srv/samba/Demo/Example/
# chmod 2770 /srv/samba/Demo/Example/
-------------------

I created a group DemoGroup with "samba-tool group add DemoGroup"
Then, when I did
Code:
chown foobar:DemoGroup /srv/samba/Demo/Example/
I got this error
Code:
chown: invalid group: "DemoGroup"
What must I do to allow groups created by samba-tool works with chown??

How can I do to assign permissions to a shared folder from command line using the power of samba4?

Thank you in advance

Last edited by dllo; 07-30-2014 at 08:50 AM. Reason: faces in the text
 
Old 07-30-2014, 11:37 AM   #2
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
HI Dllo,

I'm going to take a guess here, try creating the group in the box, old style:

Code:
groupadd DemoGroup
and of course add the desired user to it
 
Old 07-30-2014, 12:05 PM   #3
dllo
LQ Newbie
 
Registered: Jul 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you, but ... samba-tool add group?? What's the point of samba-tool? I don't want to add users and groups to old style.
Should have something that can I do with samba-tool or similar, to add permissions to a shared folder, so on.
 
Old 07-30-2014, 12:28 PM   #4
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
Hi,

Indeed it's a little redundant but at least until SAMBA 3 it was the way it worked, you added user and groups "virtually" to SAMBA but those needed to exist in the OS, otherwise they were not recognized.

you may see samba tools (not only smaba-tool) as security administration programs, it will only allows OS user groups to access the samba services/shares.
 
Old 07-30-2014, 03:05 PM   #5
dllo
LQ Newbie
 
Registered: Jul 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Spatior

samba4 don't use the local user or group indeed is not necessary to create it.
 
Old 07-30-2014, 03:44 PM   #6
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
Hi Dllo,

Didn't know that.

I tried to find some documentation about this in SAMBA 4 but no luck, I haven't played so much with this new version so I must read more and if found something I'll get back here.
 
  


Reply



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, creating a file through Win gives wrong permissions sl4sh Linux - Newbie 4 06-21-2013 09:15 AM
[SOLVED] Question: Permissions: Creating samba share, accessing it haertig Linux - Software 3 03-13-2013 04:49 PM
creating files from windows on a samba share gives read-only permissions. lievendp Linux - General 5 12-17-2008 10:55 AM
Setting permissions on a Share vonedaddy Linux - Newbie 8 11-21-2008 04:35 PM
setting permissions for samba share eagle63 Linux - Newbie 2 12-23-2005 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration