Solved

Copying Shared Network Folders and Files

Posted on 2011-02-28
23
540 Views
Last Modified: 2012-05-11
Hi Guys,

I copied shared-network folders to another server as user Administrator.
The folders copied successfully, however, on the new server the folders are hidden.
Although I've Enabled "show hidden files & folders" on the destination server, the folders are still not visible from within Windows.

Through DOS :  DIR with switch /A the folders are visible.
I tried removing the Read Only and Hidden attributes with attrib -H -R folder, but did not work.

I think the problem is that the user-rights on these folders are still set to the source server.

How can I completely reset the user-rights on these folders and remove the Read-Only and Hidden attributes?
0
Comment
Question by:Rupert Eghardt
  • 11
  • 3
  • 2
  • +3
23 Comments
 
LVL 17

Accepted Solution

by:
Sikhumbuzo Ntsada earned 500 total points
ID: 34995631
Try the following:

TAKEOWN /F <filename>
ICACLS <filename> /grant administrators:F
0
 
LVL 10

Expert Comment

by:ImaCircularSaw
ID: 34995638
Hi There,

I'd highly recommend you read the following article on folder permissions:

http://www.techotopia.com/index.php/Understanding_Windows_Server_2008_File_and_Folder_Ownership_and_Permissions

Once you've done that I would try to reset the folder owner to yourself making sure that each sub-folder inherits permissions.  this will mean that any permissions set on the folders will have to be re-configured but you will be able to assume full control of the folders/files you've copied and remove the hidden tag.

Hope this helps!
0
 
LVL 17

Assisted Solution

by:Sikhumbuzo Ntsada
Sikhumbuzo Ntsada earned 500 total points
ID: 34995661
Once you take ownership, run:

attrib -r -s -h <foldername>
0
 

Author Comment

by:Rupert Eghardt
ID: 34995673
Ok, the main folder is now visible, but still as a "hidden / read only" folder.
All sub-folders have "read only" attributes, but not hidden

I did the
TAKEOWN /F <filename>
ICACLS <filename> /grant administrators:F

I received two successful confirmation message, but when going into the Folder properties, taking off the "read-only" attribute, it processes all files in the folder.
Upon going into the folder properties again, the "read-only" attribute is back on.


0
 
LVL 4

Expert Comment

by:h3nnys
ID: 34995685
try the following

attrib -r folder\*.* /s

0
 

Author Comment

by:Rupert Eghardt
ID: 34995700
I tried both:
attrib -r folder\*.* /s
attrib -h folder\*.* /s

It comes back with message:  "Not resetting system file"

I then did attrib -s -h folder\*.* /s and then
attrib -r folder\*.* /s

Which seemed to work, but when I went back into the folder properties, the "read only" and "hidden" ticks were still on.
0
 
LVL 17

Expert Comment

by:Sikhumbuzo Ntsada
ID: 34995718
ATTRIB -R *.* /S /D
0
 
LVL 4

Expert Comment

by:h3nnys
ID: 34995735
How did you copy the folder over ?

Iwould suggest copying it again with xcopy as xcopy overwrites the read-only and hidden attributes
0
 

Author Comment

by:Rupert Eghardt
ID: 34995747
The attrib -r *.* /s/d doesn't work also.
I will probably have to re-copy then, the folder is just HUGE!
0
 

Author Comment

by:Rupert Eghardt
ID: 34995873
What is [Admin Edit]

Should I boot the server with this cd?
0
 
LVL 12

Expert Comment

by:Sommerblink
ID: 34995912
Well, copying files from a share would mean that your files would inherit the permissions of the folder that you copied them to, unless you did something other than a straight drag/drop from one Explorer window to another.

How did you copy these files over?

Perhaps you can execute the command

"icacls [PathToFolder]" and provide us with the output

(If Icacls doesn't work, use cacls instead)
0
 

Author Comment

by:Rupert Eghardt
ID: 34996079
I simply opened the destination server's shared folder from the source server.

I then copied the shared data folder from the source server into this shared folder being open from the source server side.

The result of icacls FOLDER is:
NT authority\system:(I)(OI)(CI)(F)
Builtin\administrators:(I)(OI)(CI)(F)
Builtin\Users:(I)(OI)(CI)(RX)
Builin\Users:(I)(CI)(AD)
Builin\Users:(I)(CI)(WD)
Creator Owner: (I)(OI)(CI)(IO)(F)

Successfully processed 1 files


0
 
LVL 12

Expert Comment

by:Sommerblink
ID: 34996362
Did you hand-type these in?

You have both "Builtin\Users" and "Builin\Users"

I don't see a modify permission, although I do see a RX permission which is read/execute, which should allow you to see that folder.

The account that you are using to try to see this folder, is it a user who is logged into the computer the files reside on, or through a share?

Would you mind giving me the output from the command 'whoami', from the machine you are trying to access the files from (even if its local).
0
 

Author Comment

by:Rupert Eghardt
ID: 34996418
Sorry, Yes, all of them should read "Builtin .."

After a restart I am able to see the folder (with view hidden files and folders ON)
I am locally logged onto the server as Administrator with full admin rights.

However, when I right-click the folder, properties, the "read-only" and "hidden" is still on.
I managed to share the folder, so all is OK for now.
Still not sure why the "read-only" and "hidden" is enforced on this folder ...

WhoAmI = domain\administrator
0
 

Author Comment

by:Rupert Eghardt
ID: 34997518
I went back and re-copied the folder with all folders with XCOPY.
When I try to take off the "read only" attribute off the main folder, it says
"An error occurred applying attributes to the file ..." and gives a name of some sub-folder file

The sharing worked, but users were not able to access some files, it says "access denied".

I used the command TAKEON /F MAIN_FOLDER /R
to reset owner permissions on all folders, including sub-folders.

No luck thus far ...
0
 
LVL 8

Expert Comment

by:subhashchy
ID: 35002405
Try running   below command..

attrib -s -r -h * /s

SOme time i have seen if we attrib with s or r or h it does not work correctly however using all three switches together works fine..
0
 

Author Comment

by:Rupert Eghardt
ID: 35004838
Ok, I think I found the solution;

1.  I am using sfk (swiss file knife) to copy the files across from the source to the destination server share (mapped drive).   XCOPY didn't work (out of memory - I guess the data set to big)

2.  Then from the destination service, in the data folder I run attrib -h -s -r *.* /s

3.  I use TAKEOWN /F data_folder_name /R (process all sub-folders)

4.  I then do ICACLS data_folder_name /grant administrators:F /T (process all sub-folders)

5.  Go to security settings for the folder;  advanced, edit
Remove "include inheritable permissions ..", select COPY
Remove USERS at domain
Add the Group, give rights to the Group
Click on "Replace all existing ..."
Apply, Yes

6.  Click ADVANCED sharing
Share the folder - name
Click on Permissions, give permissions to the Group
Remove Everyone

The folder is now fully accessible by all network (group) users.

This seems to work, not sure whether all the above is the best way of doing this;

Thanks for all  your help !!

0
 

Author Comment

by:Rupert Eghardt
ID: 35070432
Dear Vee_Mod,

I have no idea what you are talking about, of what you are referring to.
Please could you bring me into the picture here ...
0
 

Author Comment

by:Rupert Eghardt
ID: 35070547
Ok, but I don't have any reference or record of posting anything about a CD ... or downloadable disk?
Who posted it here?
0
 

Author Comment

by:Rupert Eghardt
ID: 35070790
I thought you meant that I posted some offering here ... which wasn't the case.
0

Join & Write a Comment

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now