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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ownership and permissions

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello all,

I have a directory which has the ownership admin::comp and has the permissions rwxrwx---. I want to use this directory so that anyone in the comp group can copy files into it. However, I want the file been copied to have the same ownership and permissions as the directory - so the file will be owened by admin instead of the user who copied the file. Is there a way to do this and if so how do i do it?

Thanks for your help

 
If a user creates a file, it will always have the ownership of that user. You have the following options :-

Get the users to 'su admin' before the file is created.
or
Get the users to 'chown' the file after it is created.
or
Run a 'root' cron job every few minutes to 'chown' all the files in the directory.
 
Create a setuid program that does only the job you want it to do -- copies these particular files to a prticular directory -- and have the program owned by admin. Allow users to call this program. Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
im not sure, but.. "owned by admin" seems like a
possible Scurity hole if you're not careful in
what programs will be changed to be 'admin' owned.

just a comment >=]

Kevin
 
Your users could try "sudo" if you have that installed and configured. IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top