bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp -p error when directory security is modified from Windows


From: Greg Aloe
Subject: cp -p error when directory security is modified from Windows
Date: Wed, 27 Jul 2005 11:21:28 -0400

I'm not sure what information to relay to you, so I'll do the best I
can, and let you follow up with questions.

 

I can reproduce this on Linux (both i686 and x86_64), but not on
Solaris.  Here is the uname -ar info for each of these.

 

Doesn't work onLinux:

Linux hostname 2.4.21-193-smp #1 SMP Wed Jan 21 18:41:44 UTC 2004 x86_64
x86_64 x86_64 GNU/Linux

Linux hostname 2.4.18 #14 SMP Mon Feb 10 15:36:47 EST 2003 i686 unknown

 

Works on Solaris:

SunOS hostname 5.6 Generic_105181-33 sun4u sparc SUNW,Ultra-Enterprise

 

 

Now, here's the bug.

 

I created a directory from Linux:

 

      [hostname:/home/galoe/trash]126 % ls -ld .

      drwxr-xr-x    3 galoe    users        4096 Jul 27 11:06 .

      [hostname:/home/galoe/trash]127 % mkdir testdir

      [hostname:/home/galoe/trash]128 % ls -ld testdir

      drwxr-xr-x    2 galoe    users        4096 Jul 27 11:06 testdir

      [hostname:/home/galoe/trash]129 % 

 

Let's see what happens when I copy a file owned by someone else into
this directory using the -p option:

 

      [hostname:/home/galoe/trash]129 % cp -p
/devel/A/nightly/matlabinternetfile.txt testdir/

      [hostname:/home/galoe/trash]130 % ls -l testdir/

      total 20

      -rw-r--r--    1 galoe    users       20051 Oct 15  2003
matlabinternetfile.txt

      [hostname:/home/galoe/trash]131 %

 

Now I'll remove the file so I can show you the bug:

 

      [hostname:/home/galoe/trash]131 % rm
testdir/matlabinternetfile.txt

      [hostname:/home/galoe/trash]132 % ls testdir/

      [hostname:/home/galoe/trash]133 %

 

Now, since my Windows machine has access to this network, I can modify
the security of the directory.  Note, however, that I'm not even
changing anything.  I'm just checking a box, unchecking it, and clicking
Apply.  Here are the exact steps from Windows XP Pro 2002 with Service
Pack 2:

 

      Right-click on directory and choose "Properties"

      Click the "Security" tab

      Click to highlight "Everyone"

      Notcie that no checkboxes are marked for Allow or Deny

      Click on the Allow:Read checkbox, and then uncheck it
      The "Apply" button is now available, click it

      Click OK.

 

Now, back on Linux, let's look at the permissions and notice they didn't
change:

 

      [hostname:/home/galoe/trash]133 % ls -ld testdir

      drwxr-xr-x    2 galoe    users        4096 Jul 27 11:06 testdir

 

Now, try to copy a file owned by someone else using -p, and notice the
error, and that the permissions and ownership are incorrect:

 

      [hostname:/home/galoe/trash]134 % cp -p
/devel/A/nightly/matlabinternetfile.txt testdir/

      cp: setting permissions for `testdir/matlabinternetfile.txt':
Operation not permitted

      [hostname:/home/galoe/trash]135 % ls -l testdir/

      total 20

      -rwxr-xr-x    1 batserve users       20051 Oct 15  2003
matlabinternetfile.txt

      [hostname:/home/galoe/trash]136 %

 

 

If this has already been reported, please tell me where to find the bug
report.

 

Thanks,

Greg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]