This is a discussion on file permission problem within the AIX Operating System forums, part of the Unix Operating Systems category; --> x is a user account of group X y is a user account of group Y How can x ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| kanpeter@graduate.hku.hk wrote: > x is a user account of group X > y is a user account of group Y > > How can x run a shell script to create a file in y's directory with > file owner set to y and group set to Y ? Thanks. No way. Only y and root can do that. And I am deliberately ignoring tools like sudo, it's just too messy to abuse a tool to achieve something that you probably don't really need. But I am sure that there is a good way to solve the underlying problem, if you care to tell us what you want to achieve. Yours, Laurenz Albe |
| |||
| kanpeter@graduate.hku.hk wrote: > x is a user account of group X > y is a user account of group Y > > How can x run a shell script to create a file in y's directory with > file owner set to y and group set to Y ? Thanks. > <dangerously-insecure> have a cron job or daemon running with root priv that looks at the contents of a trigger file (say, in /tmp), creates files with ownership and privs set according to entries in that trigger file, then deletes the trigger file? </dangerously-insecure> > -- peter |
| ||||
| kanpeter@graduate.hku.hk wrote: > x is a user account of group X > y is a user account of group Y > > How can x run a shell script to create a file in y's directory with > file owner set to y and group set to Y ? Thanks. You'll not want to do this. Think different. Use the "mailbox" scheme. Make a /path/to/mailbox and set a "chmod 770 /path/to/mailbox". Put x and y to a common Z group. chgrp Z /path/to/mailbox > > -- peter > |