chown

Hello

My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into the database. how can I change the owner without root rights? Thanks for the support.

roger

Not at all by default; only root can chown cause of security reasons. root could create a group where hugo and hugo2 are members. If possible, you could then let root chgrp this group onto the xml file with read permissions and make sure, that it could be reached due to directory permissions, ie. that hugo2 can at least read it for it's import into the DB.

thanks for the answer. can I make something with sticky bit?

Nope, sticky bit will not help you in that case. From the man page of chown:

RESTRICTED DELETION FLAG OR STICKY BIT
       The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type.  For directories, it prevents unpriv-
       ileged users from removing or renaming a file in the directory unless they own the file or the directory; this is called the restricted deletion
       flag for the directory, and is commonly found on world-writable directories like /tmp.  For regular files on some older systems, the  bit  saves
       the program's text image on the swap device so it will load more quickly when run; this is called the sticky bit.

As recommended, I'd go for the group thing described in my former post. If it is no sensitive data, you could always chmod it to o+r so that all others could read it, which would include hugo2 as well as all users on that system.