Samba folder containing subfolders with specific rights
Lately I'm getting this question a lot.
For every project I want to create a tree like this:
Only drawing should be able to read/write in 'drawing'.
Only secretariat should be able to read/write in 'secretariat'.
And so on...
I think I can manage to set this up in samba. The problem is, is there a way to enforce those rights when a new project is created from a windows client?
PS: you may want to look at swat... a gui based samba administration tool which you can use to manage samba server from client machine
You can create in advance every folder for every project ...or ...this is what I've done...I've created a web interface on the samba server..and when someone wanted to create a new project...he would access the web interface and create the folder structure from there.The web interface allowed the users to manage projects...create/delete, add information about them.
Isn't this a problem just crying out for a script?
You could write a script that would take an input of a name (say, $project), and create the directory structure in the appropriate location. It seems like it would be pretty straightforward:
chmod 777 /home/$project
chmod 770 /home/$project/drawing
chown drawing:drawing /home/$project/drawing
Make the script executable by whoever is allowed to set up projects, and make sure it's accessible.
Throw in some error checking, test it, and voila! Or am I missing something?
Thanks! All 3 replies are pretty useful.
Now looking if there is a way to automatically trigger the script. But running it from a webpage will do for now.
|All times are GMT -5. The time now is 01:19 PM.|