Unix Technical Forum

file permission problem

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 08:37 AM
kanpeter@graduate.hku.hk
 
Posts: n/a
Default file permission problem

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.

-- peter

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 08:37 AM
Laurenz Albe
 
Posts: n/a
Default Re: file permission problem

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 08:37 AM
takarov2003@yahoo.com
 
Posts: n/a
Default Re: file permission problem

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 08:37 AM
Claudiu Costin
 
Posts: n/a
Default Re: file permission problem

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
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com