file backup

mkramer777
mkramer777 used Ask the Experts™
on
I have a program that backs up a user's documents folder to a NAS.  It backs up to folders on the NAS that are the name of each user.  I was wondering how I would go about editing these folders permissions so only the user that should have access can save into the folder or look at the folder. I know sometimes it gets a little complicated with permissions.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You should be able to log into the Nas drive via a browser.  Once logged in as an administrator, you can access the control panel  and from there, set up the users and the folder permissions

Author

Commented:
I guess I should have asked this differently.  I actually copy the folders to a win 2008 server and then backup this up to the NAS.  how do I set up this scenario of the server?

Commented:
Hi mkramer777, you have a network share on the 2008 r2? server and you want each of the sub-folders to only allow the one specific user to read or write to that folder. You also want that to be a different user for each sub-folder. Is that what you are trying to do?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yes.  I want a user (for example the name could be f-cpumek)  to be able to open a network share folder on the server that is called cpumek and only f-cpumek can access that folder.  A user like f-abc could not open the cpumek folder.  They would though be able to open the folder associated with their username which would be abc for example.
Commented:
There would be several ways to do this.
None of them would ultimately keep the administrator from getting in, but that is by design.
Set up a share on the server.
There are several ways to do this too.
On the server, make a folder in the location that you want.
Give it a name like UserFolders.
Right click the folder and click properties.
Click on the Sharing Tab.
Click on the Advanced Sharing button.
Check the Share This Folder Box.
Click on Permissions.
Give everybody Full Control
Inside the Folder make a new subfolder for each user.
For instance make a new folder for JohnB.
To do this, right click in the UserFolder folder that you just made.
Click on New.
Choose Folder.
Name the Folder JohnB.
Now give it permissions.
Right click on the JohnB folder.
Choose Properties
Click on the Security Tab.
Click on Advanced
Click on Change Permissions
Uncheck the box that says include inheritable permissions form the objects parent.
A box should come up that says Add Remove or Cancel.
Choose Remove
In the box that appears, only the administrator should be listed.
Choose Add and add JohnB
Give him full control.
Click OK
You would need to do this for each user.
If you have several, it would be easier to use a command prompt, but this should get you by to do what you want.
Make one share and assign each sub-folder with a different user's permissions.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
If you are after something working automatically - sorry, no. Individual permissions need to be set for each folder. If you want to have a static setup, create a script creating the folder with corresponding permissions.

A more simple approach is to remove all permissions from the top-most folder all users' folders are in, but the create directory for everyone and full access for File Owner. With this people should be able to create folders, and if they do, only they should have access to it.

Author

Commented:
How would I go about creating a script?  Not familiar with that.
 Maybe that might be too complicated for me though.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Then you should consider the second approach, which is "self-managed".

Commented:
mkramer777,

It depends on how many people you need to set up folders for and how quickly you want to do it.
If it is just a handful, go through the steps.
I think Qlemo is right though, you should be able to remove the permissions from the first folder, the one I called UserFolders, then just add the particular user's permissions to each particular folder when you make it.
That would save about half the time and effort - if it works and it should.

If you have a regiment of folders to make, you could try the PS approach and I think there is even an initial script to get you started here: https://gallery.technet.microsoft.com/scriptcenter/How-to-create-home-folder-d968f1d4 No guarantees though, I haven't had need to try it.

Thanks,
Happy New Year,
B.
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
If there is need to do so, I can assemble a PS script prompting for the name, and do the needful. But I'm hesitant - handling of ACLs (privleges) is kind of ugly in PS (and elsewhere).

Author

Commented:
All of the folders are already created. Do the above solutions work the same way for folders that are already created?
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
Since the users didn't create the folders themselves, as I suppose, it is getting cumbersome. If they are the owner of their folder, it is easier - just set the top-most folder privileges as suggested, making sure OWNER gets full access, and propage that to all folders.
Even if they are not owner yet, you can make them owner manually - if there are only a few folders.

It's not worth it to try to set up a script for this, IMHO.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial