"Frank McCown" <mc*****@yahoo.com> wrote in message
news:87**************************@posting.google.c om...
This is a reference to the chown function that changes FILE ownership,
not DIRECTORY ownership. I've tried to use the chown function to
modifiy dir ownership, and it fails.
it's in there....
perldoc -f chown
It works for me on both files and directories using 5.8 on both Linux and
cygwin.
Only problem I had on Linux was a permission problem when doing it as
someone other than root... doing
chown $owner, -1, $dir or print "unable to change $dir: $!"
gave me "Operation not permitted" as me, but as root, it worked without a
problem.
What error did it give you?
From cygwin:
$ ll
total 0
drwxrwxrwx+ 2 SYSTEM None 0 Dec 2 23:29 dir/
-rw-rw-rw- 1 SYSTEM None 0 Dec 2 23:29 file1
-rw-rw-rw- 1 David None 0 Dec 2 23:29 file2
$ perl -e 'chown ((stat("file2"))[4], -1, "dir", "file1");'
$ ll
total 0
drwxrwxrwx+ 2 David None 0 Dec 2 23:29 dir/
-rw-rw-rw- 1 David None 0 Dec 2 23:29 file1
-rw-rw-rw- 1 David None 0 Dec 2 23:29 file2