LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba Public Folder Permissions (http://www.linuxquestions.org/questions/linux-networking-3/samba-public-folder-permissions-118168/)

decoone 11-20-2003 09:59 AM

Samba Public Folder Permissions
 
I have a Samba server with a Public folder. Inside the Public folder, there are subfolders belonging to various groups. I need a way to make sure that any files or folders created or edited within these subfolders ALWAYS take on the permissions of the parent folder - Is that possible? How?

jcookeman 11-20-2003 10:06 AM

How about 'force create mode' or 'force directory mode' for the share:

http://freebooks.by.ru/view/SambaIn24h/ch07-03.htm

aqoliveira 11-20-2003 11:45 AM

Howzit

Under linux set the SGID on the folder. The folder perms will look like this e.g rwxrwsr_x folder. Make sure that the users u want r placed in the correct group. Use the cmd chmod g+s folder or chmod 2??? folder.

chow

siddysid 04-01-2004 07:21 AM

Shared Directory
 
I tried creating a shared directory. I created the group project. Added several users to the group. Changed the permissions on the directory with chmod 770 /home/project. Then I set the SGID wit chmod g+s /home/project. I tried logging in as one of the users and they get permission denied. What am I doing wrong? Help please. Thanks in advance.

balackcheng 09-26-2007 12:42 AM

Quote:

Originally Posted by siddysid (Post 851635)
I tried creating a shared directory. I created the group project. Added several users to the group. Changed the permissions on the directory with chmod 770 /home/project. Then I set the SGID wit chmod g+s /home/project. I tried logging in as one of the users and they get permission denied. What am I doing wrong? Help please. Thanks in advance.


Hi,

Instead of using sgid for the above action, you should use force group = project in smb.conf. Pls see below for an example:

[project]
comment = Project shared folder
path = /home/project
read only = yes
write list = @project
create mask = 0660
directory mask = 0770
force group = project

Hope this help!


All times are GMT -5. The time now is 03:27 PM.