linuxmuster / linuxmuster-base7

Mangement scripts for linuxmuster.net V7
GNU General Public License v3.0
13 stars 8 forks source link

Create necessary folders for webuiUpload during setup #113

Closed PLanB2008 closed 3 years ago

PLanB2008 commented 3 years ago

For uploading files we need an upload structure to upload date. Currently these folders are created during webui installation in postscript. This has the big disadvantage not to work during the initial setup because there are no samba groups to set the acls.

My suggestions would be to create this folder structure after samba is provisioned:

/srv/webuiUpload/default-school/
> teachers 
> students
> schooladministrator

and giving these folders the right ACL:

 setfacl -m group:"role-teacher":rwx /srv/webuiUpload/default-school/teachers
 setfacl -m group:"role-student":rwx /srv/webuiUpload/default-school/students
 setfacl -m group:"role-schooladministrator":rwx /srv/webuiUpload/default-school/schooladministrator

As a bonus it would be nice to add this for creating a new school in multischool environment.

HappyBasher commented 3 years ago

I do not think this is a proper solution. Each package should be self-responsible for its folders. Please provide a script that performs the necessary changes. The script can be invoked at the right time during setup. This ensures that changes do not have to be made in other packages each time.

HappyBasher commented 3 years ago

Place the script with a suitable name in /usr/lib/linuxmuster/setup.d/ and you're fine.