Greetings,
How should chown (or fchown) behave when used on an NFS mounted filer share?
I'm trying to set up an anonymous FTP server, using an NFS mounted directory as my file space. It works fine, until I try to configure anonymous uploading. Whenever I try this, I get a "fchown: not owner" error. I look at the code (wu-ftpd 2.6) and it looks like it fails on a series of fchown calls.
How can I expect fchown to work? Is this OS dependent? Does the filer respond to these calls in a predictable way?
I have a 720 running DataOnTap 5.3.2R1.
By default, only root can chown files. There is an option called wafl.root_only_chown which is set to on by default. If you turn it off and have a client that allows non-root users to chown (most modern version of UNIX do, SunOS 4.x, for example does not), then the owner of the file can chown a file as well.
Now, if your ftpd is running as root, you have to be sure that the filesystem is exported with root permissions to the ftp server. Otherwise, the filer (actually any NFS server) will map root (uid 0) to nobody. Nobody will probably never own files so the process would receive a "Not Owner" message even though the process is running with an effective UID of 0.
I haven't looked at the ftpd code in a while, but this is my first guess based on the info you provided.
Hope this helps.
-- Adam Fox NetApp Professional Services, NC adamfox@netapp.com