Click to See Complete Forum and Search --> : Permissions


sdunn
07-18-2001, 03:28 PM
What I want to do is have anyone write a file and put it in a directory. What I want to happen is no matter who writes it, it will be owned my me with 4755 permissions.
How do i do this

njcajun
07-18-2001, 04:04 PM
I don't know of a way to do that - could you tell me what you're trying to accomplish by doing that?

What you're basically saying is that somebody can write a file, but then can't delete or edit it - they can only read it. They also don't own it anymore.

By default, the owner of a file is the creator, so I think there would have to be some sort of cron job or other script or something that polls directories for new files, then makes the appropriate changes.

Other than that, you might consider doing a 'man umask' and seeing if there's anything there.

If this is a development environment, which it sounds like it might be, DEFINITELY look into 'CVS', which accomplishes what you're trying to do in a much cleaner way.

sdunn
07-18-2001, 04:26 PM
What I am trying to do is have this web program write to the webpage directory.(I am creating a web store) I was getting permission errors saying permission denied. So i thought it was trying to come in as a different user and was getting denied. But I reinstalled a couple of things and everything is working fine now. Thanks for the nicely detailed reply.