I have a cron script that runs weekly that exports my database info and moves it, via NFS, to my "/data" partition for backup on my main box. I continually am getting messages that tell me that "ownership cannot be preserved" during the mv process. I can't believe that there is not a switch in the mv command that will simply not try to assign ownership. I have already tried move.file > /dev/null with no better results. Anyone have any ideas? -- </Jared> Registered Linux User # 302569 "People demand freedom of speech to make up for the freedom of thought which they avoid." ~ Soren Aabye Kierkegaard (1813-1855)
* Turd Ferguson (turdferguson@infowest.com) [030428 15:56]:
I have a cron script that runs weekly that exports my database info and moves it, via NFS, to my "/data" partition for backup on my main box. I continually am getting messages that tell me that "ownership cannot be preserved" during the mv process.
The files are owned by root and you copying them an nfs filesystem? You wouldn't want the ownership to preserved for security reasons. By default, root_squash is set for nfs exports which maps uid 0 -> uid 65534. You can export the filesystem no_root_squash but don't do that unless you absolutely understand what you are doing.
I can't believe that there is not a switch in the mv command that will simply not try to assign ownership.
It's hard to imagine what that would do.
I have already tried move.file > /dev/null with no better results.
You want standard error to go to /dev/null, not stdout: move.file 2>/dev/null
Anyone have any ideas?
Copy the files as a user other than root, use rsync or scp instead of nfs. -- -ckm
I already have it as no_root_squash. :-) Thanks anyway, </Jared> On Mon, 2003-04-28 at 17:08, Christopher Mahmood wrote:
* Turd Ferguson (turdferguson@infowest.com) [030428 15:56]:
I have a cron script that runs weekly that exports my database info and moves it, via NFS, to my "/data" partition for backup on my main box. I continually am getting messages that tell me that "ownership cannot be preserved" during the mv process.
The files are owned by root and you copying them an nfs filesystem? You wouldn't want the ownership to preserved for security reasons. By default, root_squash is set for nfs exports which maps uid 0 -> uid 65534. You can export the filesystem no_root_squash but don't do that unless you absolutely understand what you are doing.
I can't believe that there is not a switch in the mv command that will simply not try to assign ownership.
It's hard to imagine what that would do.
I have already tried move.file > /dev/null with no better results.
You want standard error to go to /dev/null, not stdout: move.file 2>/dev/null
Anyone have any ideas?
Copy the files as a user other than root, use rsync or scp instead of nfs.
--
-ckm -- "Turd Ferguson. Yeah, he's a funny guy." ~Burt Reynolds (As portrayed by Norm McDonald of SNL)
It works fine. The file is copied. I just don't want to see the "failed to preserve ownership" error. It's throwing an error in my cron job because of this extra text. </Jared> On Mon, 2003-04-28 at 17:51, Christopher Mahmood wrote:
* Turd Ferguson (turdferguson@infowest.com) [030428 16:30]:
I already have it as no_root_squash. :-)
Then it would work. Maybe you didn't reload nfsd after changing?
-ckm -- "Turd Ferguson. Yeah, he's a funny guy." ~Burt Reynolds (As portrayed by Norm McDonald of SNL)
* Turd Ferguson (turdferguson@infowest.com) [030428 17:08]:
It works fine. The file is copied. I just don't want to see the "failed to preserve ownership" error.
I don't doubt that copy is working, what I'm saying is that if the filesystem really is exported no_root_squash and root is writing the file there would be no error. As your files are being copied they are having the ownership changed to 'nobody'. -- -ckm
participants (2)
-
Christopher Mahmood
-
Turd Ferguson