Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File owner

Status
Not open for further replies.

csrazdan

Programmer
Mar 20, 2007
2
US
Hi Guys,
We are working on IBM AIX 5.3 and have following requirements:
1. Whenever a file is created in a directory it is created as owner abc eventhough if user xyz has created it.
2. Whenever a file is created in a directory it gets created with permission 666.

We have a tool which creates a log files with owner as root in the log directory because tool engine was started as root. Also the files are created with 644 permissions.

Can I do something on directory level to take care of this.

Thanks for your help in advance.

Regards,
Shekhar
 
The easiest way to do that is to write a script with chown and chmod!

first use chown to change the user and then use the chmod to change the file permission to 666!

If you don't have that much control on the software used to create the log, then put that script in crontab and schedule it accoringly!

Regards,
Khalid

 
Thanks Khalid for your reply. However, the suggested approach is not an option in this perticular case. I'll look for some directory level sticky bit configuration which might take care of this.

Thanks...
 
Though this won't add much but since you are looking into sticky bit look as well of the possiblity of using sudo!

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top