Copying Shared Network Folders and Files

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?
Rupert EghardtProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sikhumbuzo NtsadaIT AdministrationCommented:
Try the following:

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ImaCircularSawTechnical LeadCommented:
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
Sikhumbuzo NtsadaIT AdministrationCommented:
Once you take ownership, run:

attrib -r -s -h <foldername>
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Rupert EghardtProgrammerAuthor Commented:
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
h3nnysCommented:
try the following

attrib -r folder\*.* /s

0
Rupert EghardtProgrammerAuthor Commented:
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
Sikhumbuzo NtsadaIT AdministrationCommented:
ATTRIB -R *.* /S /D
0
h3nnysCommented:
How did you copy the folder over ?

Iwould suggest copying it again with xcopy as xcopy overwrites the read-only and hidden attributes
0
Rupert EghardtProgrammerAuthor Commented:
The attrib -r *.* /s/d doesn't work also.
I will probably have to re-copy then, the folder is just HUGE!
0
Rupert EghardtProgrammerAuthor Commented:
What is [Admin Edit]

Should I boot the server with this cd?
0
SommerblinkCommented:
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
Rupert EghardtProgrammerAuthor Commented:
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
SommerblinkCommented:
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
Rupert EghardtProgrammerAuthor Commented:
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
Rupert EghardtProgrammerAuthor Commented:
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
subhashchyCommented:
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
Rupert EghardtProgrammerAuthor Commented:
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
Rupert EghardtProgrammerAuthor Commented:
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
Rupert EghardtProgrammerAuthor Commented:
Ok, but I don't have any reference or record of posting anything about a CD ... or downloadable disk?
Who posted it here?
0
Rupert EghardtProgrammerAuthor Commented:
I thought you meant that I posted some offering here ... which wasn't the case.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.