Permission inheritance via Samba
Hello to everyone,
I'm having an issue about umask . Now, I have a Samba directory shared called /mydirectory the user can access to this directory is an "administrator" user from Windows. Directory and Samba does it works. Now, when i use my directory under windows owner and group are "administrator" and when i log into my Rhel system as root and i create a directory under /mydirectory owner and group is root. What i really want is "mkdir directory" and allow the new directory inherit the "administrator" user from parent directory. But mkdir has no this kind of function, therefore over this forum i saw "umask" could help but umask that i know it's only for permission to files and not for a specific user or group. How can i workaround this? In poor words, 1. administrator open the samba directory, the samba directory has administrator:administrator as owner and group 2. administrator create the "goofy" directory 3. "goofy" directory created from another system must inherit owner and group so it will be "administrator:administrator" That's my aim. Davide |
Code:
mkdir /mydirectory/goofy Quote:
chown -R /mydirectory/ will change all of the sub directories. |
There's no "mkdir" for inherit user, i have to switch anytime with chown and chgrp
there's no method to inherit for any subdirectory the parent user:group without anytime switch with chown and chgrp? can't umask be useful for that? Or should i create an alias command to include "mkdir, chown, chgrp" commands for that folder? |
Waiting for some suggestions :)
|
If I understand what you are wanting to do, why don't you make a simple shell script for it? Something like.
Code:
#! /bin/bash |
1 Attachment(s)
It does works dude. Thank you. There's a little error, in attachment though the OS is in italian.
If you need any translation let me know. |
I don't think you need a loop there if you only intend to create dirs one at a time.
Alternately, you could add an option after read to see if its eg 'zz', in which case it breaks out and exits. Your choice. Incidentally, Linux is case sensitive, so davide != Davide .... |
Thank you, got it :)
|
All times are GMT -5. The time now is 02:03 PM. |