Page 1 of 1 1
Topic Options
#187220 - 2008-04-23 06:34 PM COPY function : little bug
mignonben Offline
Fresh Scripter

Registered: 2008-04-23
Posts: 5
Loc: Belgium
Hi guys,

Consider the following:

1) I don't have NTFS permissions on folder C:\Folder1\Subfolder1
COPY "C:\Folder1\" "C:\Folder2\" /C /S /R /S
=> C:\Folder2\Subfolder1 is created (shouldn't be)

2) I don't have NTFS permissions on folders C:\Folder1\Subfolder1 and C:\Folder1\Subfolder2
COPY "C:\Folder1\" "C:\Folder2\" /C /S /R /S
=> C:\Folder2\Subfolder1 is created (shouldn't be) but C:\Folder2\Subfolder2 is not (ok)

Looks like a bug, isn't it?

Benoit.

Top
#187222 - 2008-04-23 06:58 PM Re: COPY function : little bug [Re: mignonben]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4642
Loc: The Netherlands
 Originally Posted By: mignonben
Hi guys,

Consider the following:

1) I don't have NTFS permissions on folder C:\Folder1\Subfolder1
COPY "C:\Folder1\" "C:\Folder2\" /C /S /R /S
=> C:\Folder2\Subfolder1 is created (shouldn't be)
....


Yes it should. If you only want the file then add *.* after c:\folder1\ and remove the /S option.


Edited by Mart (2008-04-23 06:59 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#187224 - 2008-04-23 07:23 PM Re: COPY function : little bug [Re: mignonben]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Did not test this, but quick question:
Are you the owner of the folders?

Top
#187232 - 2008-04-23 09:06 PM Re: COPY function : little bug [Re: Witto]
mignonben Offline
Fresh Scripter

Registered: 2008-04-23
Posts: 5
Loc: Belgium
Thanks for answering.
Owner or not, same result.

I noticed something else.

If you have the following tree :
C:\Folder1
├───SubFolder1
├───SubFolder2
│└───File1.txt
└───File2.txt

and you don't have NTFS permission to access the folder SubFolder1, then
COPY "C:\Folder1\" "C:\Folder2\" /C /S /R /S
creates an empty Subfolder1 and does not copy the other files and folders...

Of course, there is a workaround :
SHELL "XCOPY C:\Folder1 c:\Folder2\ /E /C /H /R /Y"

Top
#187237 - 2008-04-23 09:49 PM Re: COPY function : little bug [Re: mignonben]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Access to the folder and rights to see the folder are two different things, if you can see it, then it can create it.

In the advanced properties of the folder deny the right to see it and test again.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#187242 - 2008-04-23 10:46 PM Re: COPY function : little bug [Re: Gargoyle]
mignonben Offline
Fresh Scripter

Registered: 2008-04-23
Posts: 5
Loc: Belgium
Gargoyle, you are right on one point : access the folder and see it are two different things.
However, there is no NTFS permission to hide a folder or file... The only thing you can do on Microsoft file servers is to enable Access based enumaration on shares to hide folders and files you don't have permissions on.
The behaviour of Kixtart is strange : it cannot access a folder, and if I ask him to copy it, it creates an empty directory and aborts the copy, even with the /C argument.
I don't worry too much about it, because the workaround works perfectly.
Kixtart is great and I use it since several years. Just one detail...

Top
#187247 - 2008-04-23 11:26 PM Re: COPY function : little bug [Re: mignonben]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Copy "C:\0\Folder1\" "C:\0\Folder2\" /C /S /R /S
does not create any subfolder for me in Folder2
I use KiXtart 4.53
What version do you use?
? @KIX

Top
#187253 - 2008-04-24 12:46 AM Re: COPY function : little bug [Re: Witto]
mignonben Offline
Fresh Scripter

Registered: 2008-04-23
Posts: 5
Loc: Belgium
Thanks for replying.

I use version 4.60, but I tried with 4.53 : same problem.

If you want to reproduce the "problem" :
1) create subfolders and files on your "C:\0\Folder1\" folder
2) Remove access (NTFS permissions) to one of them (Everyone deny all on "C:\0\Folder1\Subfolder1" for example)
3) Copy "C:\0\Folder1\" "C:\0\Folder2\" /C /S /R /S

You will see that "C:\0\Folder2\Subfolder1" is created (empty), and the copy is aborted after that creation.


Edited by mignonben (2008-04-24 12:51 AM)

Top
#187255 - 2008-04-24 06:15 AM Re: COPY function : little bug [Re: mignonben]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
 Quote:
However, there is no NTFS permission to hide a folder or file

Not true - If you access the advanced properties of a file / folder, you can edit the ACL to not allow the "list folder / read data". This will prevent you from seeing the folder.

If you can see the folder, then KiX can see the folder.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#187256 - 2008-04-24 07:06 AM Re: COPY function : little bug [Re: Gargoyle]
mignonben Offline
Fresh Scripter

Registered: 2008-04-23
Posts: 5
Loc: Belgium
 Originally Posted By: Gargoyle
 Quote:
However, there is no NTFS permission to hide a folder or file

Not true - If you access the advanced properties of a file / folder, you can edit the ACL to not allow the "list folder / read data". This will prevent you from seeing the folder.

Not true - Removing the List permission for the folder prevents the user from gaining access to any file IN THE FOLDER. You cannot set NTFS permission to hide a file / folder and see other file / folder in the same folder, as Novell NetWare can do. If you are not convinced, make the test or read this : http://support.microsoft.com/kb/308419

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 159 anonymous users online.
Newest Members
emnipetro, Hirze, thequeen, ameliaryan, shalomsalami
17641 Registered Users

Generated in 0.035 seconds in which 0.011 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org