*BSD News Article 91868


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!news.maxwell.syr.edu!EU.net!Ireland.EU.net!maths.tcd.ie!not-for-mail
From: dwmalone@maths.tcd.ie (David Malone)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: mv filename: set owner/group: Operation not permitted
Date: 24 Mar 1997 19:12:34 -0000
Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
Lines: 32
Sender: mathnews@graves.maths.tcd.ie
Message-ID: <5h6jn2$e0i@graves.maths.tcd.ie>
References: <Pine.SUN.3.95.970323163337.10686A-100000@typhoon.typhoon.co.jp> <5h6elc$1mk@ui-gate.utell.co.uk>
NNTP-Posting-Host: graves.maths.tcd.ie
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37677

brian@shift.lan.awfulhak.org (Brian Somers) writes:

>> Whenever I 'mv' a file from one file system to another, I get this
>> error/warning message:
>> 
>> mv: /target/filesystem/filename: set owner/group:  Operation not permitted
>> 
>> The file is moved successfully though.  mv'ing files within the same file
>> system doesn't producing any such message. 
>> 
>> The mv man page mentioned that "As the rename(2) call does not work
>> across file systemf, mv uses cp(1)  and rm(1) to accomplish the move... 
>> 
>> Is there anything I can do to avoid the said error/warning message?
>> Thanks for any pointers.

>That's because the mv(1) command can't chown(2) the file to someone
>else.  There's no warning if you mv your own files.


This usually occures on /tmp, where the file may be made with
group ownership set to that of /tmp. When you mv the file, mv
tries to set the group to a group you are not in, and gives
the warning.

I guess the man page should really not that it is more like
"cp -p ; rm" than "cp ; rm".

You can avoid the message by doing a "chgrp mygroup file"
before moving it. Or you can just ignore it.

	David.