How to set file permissions in Init task?

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jan 25 13:37:22 UTC 2001



OUTWATER ~ KEITH J /5G3110 wrote:
> 
> Greetings all -
> 
> I use Untar_Frommemory() to set up an initial file system which includes a
> "/tmp" directory.
> 
> I am attempting to make this directory read/write by everyone in the Init task,
> but chmod() fails (not owner).
> 
> Where, then, is the right place to set this permission?

Before you create the tar image.   My thinking is that the image on your
local disk before you tar is exactly what you want to untar, permissions
included.  There might be some tricks with seteuid() or something to make
this work out easier.  I would not expect you to need to change permissions
after untar'ing.

> Thanks!
> 
> Keith
> 
> Keith Outwater
> Principal Engineer
> Raytheon Missile Systems
> Tucson, AZ
> 
> (520) 794-2518
> vac4050 at nospam.cae597.rsc.raytheon.com

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list