change ownership issue

Malcolm Kay malcolm.kay at internode.on.net
Wed Mar 15 00:43:49 UTC 2006


On Wed, 15 Mar 2006 03:29 am, Blackburn, Marvin wrote:
> That wont allow overwrite nor delete :(
What do you mean by overwrite?
Edit parts of the file without deleting file, or replace the file 
witha new file? The latter is what most editors do. For this you 
need write permission to the directory containing the file(s) so 
that the delete can take place and and then re-added.

Unfortunately some editors are rather pedantic and won't replace 
a file to which you lack write permission even when you have 
write permission to the directory; but this is an editor problem 
and not a system limitation. You can usually get around this 
with a specific "rm" command before editing the overwriting 
version.

However this "normal" operation is disrupted if the the directory 
permissions include the sticky (t) bit. Then only the file owner 
can delete the file and only if he has write permission to the 
directory. So you should not have these files in a directory 
with the sticky bit set.

Malcolm

>
> > -----Original Message-----
> > From: redhat-list-bounces at redhat.com
> > [mailto:redhat-list-bounces at redhat.com] On Behalf Of Andrew
> > Bacchi Sent: Tuesday, March 14, 2006 11:56 AM
> > To: General Red Hat Linux discussion list
> > Subject: Re: change ownership issue
> >
> > If it's a manageable number of users, I would create a
> > common group, add
> > all users uid and the application uid to that group.  Then
> > chgrp the file to the common group with write permission. 
> > As you create new users, add them to the common group as
> > well ad their own group.
> >
> > chgrp commongroup filename
> > chmod g+w filename
> >
> > Blackburn, Marvin wrote:
> > >We have users that create files with a certain name.
> > >We also have applications which often need to overwrite
> >
> > these files --
> >
> > >not change the contents.
> > >However, if the users have created the file -- the
> >
> > application does not
> >
> > >have the pemissions to replace it,
> > >and the user cant change the ownership on his on.
> > >
> > >Any ideas how I might be able to rectify this?
> > >
> > >------------------
> > >Marvin Blackburn
> > >Systems Administrator
> > >Glen Raven
> > >"He's no failure.  He's not dead yet" --William Lloyd
> > > George
> >
> > --
> > veritatis simplex oratio est
> > 		- Seneca
> >
> > Andrew Bacchi
> > Staff Systems Programmer
> > Rensselaer Polytechnic Institute
> > phone: 518 276-6415  fax: 518 276-2809
> >
> > http://www.rpi.edu/~bacchi/
> >
> >
> > --
> > redhat-list mailing list
> > unsubscribe
> > mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list