linuxmuster / linuxmuster-webui7

Next generation web interface for linuxmuster.net v7.
https://www.linuxmuster.net
GNU General Public License v3.0
12 stars 8 forks source link

Drag&drop failed because of permissions in /srv/webuiUpload #147

Closed kiarn closed 3 years ago

kiarn commented 4 years ago

Hello,

See : https://ask.linuxmuster.net/t/austeilen-ueber-webgui-geht-nicht-mehr-leere-dateien/5821 We have to correct it fast, it's a blocking problem.

On my test server :

$ ls -la /srv/webuiUpload/default-school/teachers 
total 12
drwxr-xr-x  3 root root 4096 mai   25 22:03 .
drwxr-xr-x  3 root root 4096 juin  12 19:02 ..
drwxr-xr-x  2 root root 4096 mai   25 22:03 dr

This doesn't allow the teacher to upload files in session module : https://github.com/linuxmuster/linuxmuster-webui7/blob/c33ae1d35acc51fceb47144e0c7e2a1c7a103f58/usr/lib/linuxmuster-webui/plugins/lmn_session/resources/js/controllers/session.controller.coffee#L19

The simplest way is to give 777 to /srv/webuiUpload/default-school/teachers as postinst in die Webui, but I'm not sure it is a good idea. We can also change the group owner to role-teacher instead of root, and make a 775 on it. What do you think ?

Arnaud

PLanB2008 commented 4 years ago

We shouldn't rely on the posix mapping, I think it would be better suited to allow this group via ACL. Nevertheless adding the teachers-role seems to be a good idea for the moment.

I'll give it a try and provide a bugfix.

kiarn commented 4 years ago

Sorry, I don't remember the reason, but why don't upload this in a tmp directory in user's home, and then delete this ? Only because of the owner/group owner ? Since the webui is running as samba user, maybe this is not a problem anymore, would worth checking this.

PLanB2008 commented 4 years ago

We do this because its not safe to assume the users home folder is on the same server than the WebUI. When running with a dedicated fileserver, or in a multischoolenvironment, the fileserver runs on another server which is connected via DFS (distributed filesystem). So we upload this in a tmp directory and move it into the right home folder via samba which is using the fileserver provided via DFS transperent.

kiarn commented 4 years ago

Ha, ok ! I forgot about the DFS and multischool env, thanks for the reminder.

kiarn commented 3 years ago

Does the new ntacl permission file solve this problem ? Can we close this issue ?

PLanB2008 commented 3 years ago

This can be closed.

The other issue for the missing ntacl file is also on my list, I've to write a script which will be executed by sophomorix base during setup...

https://github.com/linuxmuster/linuxmuster-base7/issues/113

kiarn commented 3 years ago

Thanks ! :+1: