Score:0

SAMBA creating shared folders inside shared folder

cn flag

I want to create multiple shared folders with different access permissions inside the shared folder.

For example, I accessed my Server and created 2 shared folders, Projects and Documents.

Anyone can access the Documents folder, but only employees involved in a project can access the projects folder.

Everything is OK until this part.

The real question is this.

Access the worker projects folder in a project.

There are 3 different projects. I want to open different folders for each project in the project folder and only the employees working in that project will be able to access these folders.

For example, if I am working in project 1, I can access the projects folder, but I cannot access the other 2 folders.

I created 2 shared folders /media/samba share/projects/project1 and /media/samba share/projects/project2 but these shared folders do not appear inside the projects folder, each one appears as a different folder together with other folders.

I want to open multiple shared folders with different permissions inside a shared folder, how can I do it?

Score:0
in flag

Not sure I understood clearly what you mean by 'open multiple shared folders ' but I suppose you mean that if user1 is working on project1, he should have access rights to folder 'project1' and to all other project having other subfolders. I would use the unix groups for that.

  1. Create a group and put all required users in that group:
 sudo groupadd project1grp   
 sudo usermod -a -G project1grp username1
  1. Define access rights on a group basis in samba ie, for each subdirectory, create a share with appropriate access rights in smb.conf

     [Project1share]
          writeable = yes
          comment = all files for project1
          force group = project1grp
          force create mode = 770
          force directory mode = 770
          write list = @project1grp
          path = /maindir/subdirproject1
          valid users = @project1grp
    
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.