SemiOT: filePro on FreeBSD chown gotcha
Walter Vaughan
wvaughan at steelerubber.com
Tue Jun 22 09:04:13 PDT 2004
We've spent a few hours chasing our tails around here with an issue that
seems like we've actually bitten our own tail.
Using a filePro export to create a file...
using "CLOSE" to make sure it gets written... file looks fine
just need to move file to a "watched" directory and everything will be
peachy-keen.
Using system "cp" < file < watch_directory worked, except that it left
the file as 0600 owned by filepro, and the watching program needed it
read-writeable.
Woops.
So I jump in and say "let's just chown it". Of course that failed
silently within the processing table. And then with my eyes as big as a
quarter it doesn't work from the command line either? What? chown
doesn't work.
Finally I break down and JPR it.
I type "man chmod". Read it three times. Should work. What the heck.
Googling is of no help web or newsgroups.
Read a fourth time. Read every letter this time.
<quote>
The ownership of a file may only be altered by a super-user for obvious
security reasons.
</quote>
Luckly in this instance, we can mv the file just fine and since the file
is created 0666 the application can read and delete it.
But what if I *really needed* to cp that file. Or change ownership?
Is this a possible wishlist item to create a file under a different
name? Or am I missing something?
--
...or for those who prefer mod_python to php
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.write("Walter")
return apache.OK
More information about the Filepro-list
mailing list