Problem "mv"ing to DOS partition, "cp" is ok....

Problem "mv"ing to DOS partition, "cp" is ok....

Post by David Lesh » Sat, 20 Aug 1994 00:30:17



I've never fixed the mount statement so non-root can write to
/DOS, but this is a root problem!

I can cp files over with no problem, but if I attempt to
mv the same file, I get:
        operation not permitted
back.

Whydat?

this is 99.14
--

& no one will talk to a host that's close...........(v)301 56 LINUX
Unless the host (that isn't close).........................pob 1433
is busy, hung or dead....................................20915-1433

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Bill Hog » Sat, 20 Aug 1994 18:48:05


: I've never fixed the mount statement so non-root can write to
: /DOS, but this is a root problem!

: I can cp files over with no problem, but if I attempt to
: mv the same file, I get:
:       operation not permitted
: back.

: Whydat?

: this is 99.14
: --

  Cuz 'mv' will only move things from one filesystem to the same kind of
filesystem, not from one kind of filesystem to a different kind of file
system, that's why.

  Why not?

  I don't know.

  Maybe it's too risky.

  Bill

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Reagan Blunde » Sat, 20 Aug 1994 21:32:47




> : I've never fixed the mount statement so non-root can write to
> : /DOS, but this is a root problem!
> : I can cp files over with no problem, but if I attempt to
> : mv the same file, I get:
> :  operation not permitted
> : back.
> : Whydat?
> : this is 99.14
> : --
>   Cuz 'mv' will only move things from one filesystem to the same kind of
> filesystem, not from one kind of filesystem to a different kind of file
> system, that's why.

>   Why not?
>   I don't know.
>   Maybe it's too risky.

Bzzzt.. Mv will try to keep the same owner and group on the file, when
the file gets moved to the MSDOS partition, it then tries to chown the
file. Because the MSDOS filesystem doesnt allow for ownership, it
gives the 'operation not permitted' error.. it can be safely ignored.

--
Reagan Blundell                 The bats have left the bell tower

                                Red velvet lines the black box
                                Bela Lugosi's dead         -- Bauhaus

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Preston William Gilchri » Sun, 21 Aug 1994 00:54:44


Actually mv will only work on a single partition and will not work over cross
partitions no matter what the type.  I'm quite sure this is based on the way
mv manipulates data movement.

--
Preston Gilchrist                       Texas A&M University, Computer Science

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Jeffrey J. Radi » Sun, 21 Aug 1994 02:33:15






>> : I've never fixed the mount statement so non-root can write to
>> : /DOS, but this is a root problem!
>> : I can cp files over with no problem, but if I attempt to
>> : mv the same file, I get:
>> :      operation not permitted
>>   Cuz 'mv' will only move things from one filesystem to the same kind of
>> filesystem, not from one kind of filesystem to a different kind of file
>> system, that's why.
>Bzzzt.. Mv will try to keep the same owner and group on the file, when
>the file gets moved to the MSDOS partition, it then tries to chown the
>file. Because the MSDOS filesystem doesnt allow for ownership, it
>gives the 'operation not permitted' error.. it can be safely ignored.

along this line:

i use samba to access my mounted dos partition (/dosc) from WindowsFW.
i want to allow -rw access to the mounted partition for only members of
the group 'dos', of which users of samba will be members.  since the
msdos filesystem doesn't seem to allow ownership i can't do this.  are
there any ways around this?  i'm not quite certain why the entire mounted
MSDOS filesystem can not be restricted to root and members of a particular
group...as opposed to having different ownerships of individual files on the
mounted partition?
any suggestions are appreciated.

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Bill Hog » Sun, 21 Aug 1994 07:21:46



: : I've never fixed the mount statement so non-root can write to
: : /DOS, but this is a root problem!

: : I can cp files over with no problem, but if I attempt to
: : mv the same file, I get:
: :     operation not permitted
: : back.

: : Whydat?

: : this is 99.14
: : --

:   Cuz 'mv' will only move things from one filesystem to the same kind of
: filesystem, not from one kind of filesystem to a different kind of file
: system, that's why.
:  
   Aw jeez, WHY did I say that?

   Why oh WHY did I say that?

   I do exactly what (taken literally) I am saying here can't be done at
least twenty times every day!!!

   What I *may* have had in mind to say was that 'mv' will only COPY the
stuff you want to *move* *if* you try to 'mv' stuff from one filesystem to
a different type of filesystem.

    Example:

bedlam:[*root*]~ # mount -t msdos /dev/sdc1 /E
bedlam:[*root*]~ # cd /E
bedlam:[*root*]/E # ls -aF
./             djgpp.ark/     erlang/        oberon/
../            em-utils/      etc/           set-dj.bat*
coco/          emtex/         infopath.txt*  set-dj.sav*
djgpp/         emtex.ark/     mytex/         texfonts/
bedlam:[*root*]/E # ls /home/bhogan/stage
System3.DOS     amiga.zip       leda_tt.exe     oberon-fix.zip
bedlam:[*root*]/E # mv /home/bhogan/stage/amiga.zip .
mv: ./amiga.zip: Operation not permitted
bedlam:[*root*]/E # ls -aF
./             djgpp/         emtex.ark/     mytex/         texfonts/
../            djgpp.ark/     erlang/        oberon/
amiga.zip*     em-utils/      etc/           set-dj.bat*
coco/          emtex/         infopath.txt*  set-dj.sav*
bedlam:[*root*]/E # ls /home/bhogan/stage
System3.DOS     amiga.zip       leda_tt.exe     oberon-fix.zip
                ~~~~~~~~~
                Still there, ergo did not 'mv'!

  I hope I have *this* right!

  Sorry :(

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Robert Mob » Sun, 21 Aug 1994 09:41:23


Hrm.  I dunno about the other solutions, but when I experienced the
same problem, I eventually realized that it was because I was trying
to move files which did not conform to the DOS 8+3 standard...they
were immense filenames, and in order to move them I had to shorten
their names.  CP does it automatically, but MV wouldn't...

Robert Mobbs

: I've never fixed the mount statement so non-root can write to
: /DOS, but this is a root problem!

: I can cp files over with no problem, but if I attempt to
: mv the same file, I get:
:       operation not permitted
: back.

: Whydat?

: this is 99.14
: --

: & no one will talk to a host that's close...........(v)301 56 LINUX
: Unless the host (that isn't close).........................pob 1433
: is busy, hung or dead....................................20915-1433

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Bill Hog » Sun, 21 Aug 1994 18:04:12



: Actually mv will only work on a single partition and will not work over cross
: partitions no matter what the type.  I'm quite sure this is based on the way
: mv manipulates data movement.

: --
: Preston Gilchrist                       Texas A&M University, Computer Science

  No, at least not with Linux 1.0.9.

  I can do a true 'mv' from an ext2 partition on my C drive to an ext2
partition on my F drive.

  I think the thing that distinguished originally the Unix 'mv' operation
from the standard copy operation was that "nothing really moved", i.e.,
that if you were 'mv-ing' a file, the only thing that changed on the
disk was that the value of the pointer to the destination was set
equal to the value of the pointer to the source and then the value of
the pointer to the source was set to 'nil'.

  Basically, I guess, if the both the source filesystem and the
destination filesystem support a true 'mv'-type operation inside their
own borders, then it is at least theoretically possible to support a true
'mv'-type operation between those two filesystems, but not otherwise.

  I only have ext2 and msdos on my system at the moment, so I don't
really know if a true 'mv' takes place from, say, ext2 to HPFS or whatever.

  But just because something is theoretically possible does not mean it
is a good idea.

  I think Linux (I don't know about Unix in general) is just saying, "Hey,
this guy is trying to do a 'mv' from ext2 to msdos; that isn't smart so I
am going to just do a copy, give him a warning, and let him take the
responsibility for deleting the original file".

  Please correct me if I am wrong but I think this is just good policy.

  Bill

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Mike Batchel » Mon, 22 Aug 1994 00:53:39





>> : I've never fixed the mount statement so non-root can write to
>> : /DOS, but this is a root problem!
>> : I can cp files over with no problem, but if I attempt to
>> : mv the same file, I get:
>> :      operation not permitted
>> : back.
>>   Cuz 'mv' will only move things from one filesystem to the same kind of
>> filesystem, not from one kind of filesystem to a different kind of file
>> system, that's why.
>Bzzzt.. Mv will try to keep the same owner and group on the file, when
>the file gets moved to the MSDOS partition, it then tries to chown the
>file. Because the MSDOS filesystem doesnt allow for ownership, it
>gives the 'operation not permitted' error.. it can be safely ignored.

You may as well use 'cp' anyway, 'cause the error is not ignored by 'mv'
even if the operator ignores it.  The original files are not removed, and
you end up having to rm them yourself.
--
Mike Batchelor      

------------------------------------------------------------------------------
I've noticed that after washing your Levis several times, you end up with
enough blue lint to make another pair of jeans, but you still have the
same jeans you started out with.  This seems to violate the law of
conservation of mass.
 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Stephen Harr » Mon, 22 Aug 1994 18:32:04



: >> : I can cp files over with no problem, but if I attempt to
: >> : mv the same file, I get:
: >> :    operation not permitted
: >> : back.

: You may as well use 'cp' anyway, 'cause the error is not ignored by 'mv'
: even if the operator ignores it.  The original files are not removed, and
: you end up having to rm them yourself.

You should mount the /DOS partition with the 'quiet' option
eg have a line in /etc/fstab that looks like:
  /dev/hda1 /DOS  msdos conv=binary,quiet,uid=0,gid=0

What is happening is that 'mv' tries to do a chmod on the moved file to make
the permissions the same, and (of course) msdos doesn't accept that.  The
quiet option stops it reporting this as an error, and just ignores it.
--

rgds
Stephen

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by Joey Gibs » Sun, 21 Aug 1994 23:51:54




:||| : I've never fixed the mount statement so non-root can write to
:||| : /DOS, but this is a root problem!

:||| : I can cp files over with no problem, but if I attempt to
:||| : mv the same file, I get:
:||| :  operation not permitted
:||| : back.

:||| : Whydat?

:||| : this is 99.14
:||| : --

:|||   Cuz 'mv' will only move things from one filesystem to the same kind of
:||| filesystem, not from one kind of filesystem to a different kind of file
:||| system, that's why.
:|||  
:|||   Why not?
:|||   I don't know.
:|||   Maybe it's too risky.

Not true. As a test, I just mv'ed some stuff from one of my ext2 filesysems
to my dos partition with no complaints. I am running v1.1.29 on a mostly
home-built (software-wise, that is) system.

Joey

--


"They got a lot of coffee in Brazil" - Frank Sinatra | PGP public key
____________________________________________________ |  available on request

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by David Lesh » Wed, 24 Aug 1994 03:20:10


 Well, I guess I really stirred up a mess with this one ;-}

 to summerise:
        You can move files across filesystems.
        You can move files FROM dos.
        Moving to dos seems to fail because mv can't chmod the dos
        file. So it does not delete the original.

 and:


 of an /etc/fstab entry:

   /dev/hda1 /DOS  msdos conv=binary,quiet,uid=0,gid=0

 Does work from root, but now need to fix to work from other
 users.......

 --

 & no one will talk to a host that's close...........(v)301 56 LINUX
 Unless the host (that isn't close).........................pob 1433
 is busy, hung or dead....................................20915-1433

 
 
 

Problem "mv"ing to DOS partition, "cp" is ok....

Post by ddel.. » Wed, 24 Aug 1994 03:49:07




> Well, I guess I really stirred up a mess with this one ;-}

> to summerise:
>    You can move files across filesystems.
>    You can move files FROM dos.
>    Moving to dos seems to fail because mv can't chmod the dos
>    file. So it does not delete the original.

actually, I think the real problem is one of ownership.  My dos mount has
perms of rwxr-xr-x and ownership of root:root.  If I try and move something with
ownership and group of something other than root, I get the above mentioned
errors.  However, if I move something of ownership root:root it goes cleanly,
it doesn't matter if the permissions match that of the dos partition.  Probably
because mv doesn't change ownership, and the dos partition ownerships can't be
changed from the value set at mount time.  

Just another $0.02

Dave
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````
     _/_/_/_/     _/_/        _/_/   _/_/_/_/       David M. Del Signore
      _/    _/     _/_/    _/_/       _/    _/      University of Toledo
     _/     _/    _/ _/  _/ _/       _/     _/          Toledo, Ohio
    _/     _/    _/  _/_/  _/       _/     _/


,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````