possible to add user to existing shared folder? - directory

I'm trying to use psexec to add a user account to a shared folder. I tried this:
net share myshare=c:\myfolder /grant:"domain\bob",FULL
but it returns with "The name has already been shared". However, if I delete the share and then re-create it like this:
net share myshare/delete
net share myshare=c:\myfolder /grant:"domain\bob",FULL /grant:"jane",FULL /grant:"everyone",READ /grant:"sue",FULL
it works. But isn't there a way to just add a use to an existing share? Thanks

I was able to set the permissions using subinacl:
http://www.microsoft.com/en-us/download/details.aspx?id=23510
Some documentation/usage:
http://myousufali.wordpress.com/2012/02/17/edit-permissions-with-subinacl/
http://ss64.com/nt/subinacl.html
And this is the command I used:
subinacl /verbose=1 /share \\<ip>\<sharename> /grant=<username>=f

Related

Pyvmomi - Assign VM to specific folder with non-unique name

I'm trying to figure out how to assign a VM to a folder that does not contain a unique name. I'm currently testing with the clone_vm.py template. With the sample, I have the ability to set the folder, but it does not work correctly if there's nested folders with the same name (example below). I would like to make sure the folder assigned is the "Linux/Dev" folder, but I can only pass "Dev" and hope that it picks the right one. The line of code below is how the folder is being set.
destfolder = get_obj(content, [vim.Folder], vm_folder)
Linux
|------Dev
|------Prod
Windows
|------Dev
|------Prod
Thanks!
The best way to do that is to use a search_index.FindByInventoryPath and get the folder by the path. It can be a little confusing because of hidden folders but the MOB can help you. I answered a question where I covered how to use that search method see this answer.

How can I remove owner permission on space in alfresco?

I wrote the below code to remove permissions:
locationSpace.removePermission("Consumer");
locationSpace.removePermission("Collaborator");
locationSpace.removePermission("Coordinator");
locationSpace.removePermission("SiteManager");
Its working fine, but it's working only when that folder is created by another user.
The user that creates that folder is the owner of that folder, so the owner permission doesn't get removed.
I want to remove the owner's permission and I want to give consumer permissions to the owner.
How can I achieve this?
There are 2 ways ode doing this.
Use the setOwner again but use the admin user. So you're basically moving the ownership to admin.
Use the delete method to remove a property.
delete node.properties["cm:owner"];
node.save();
You could play with permission definitions and set up "owner" definition per your needs. In that case you would not remove it, since it would actually hold the "consumer" permission you want.
http://docs.alfresco.com/4.2/concepts/secur-permissions.html
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/script-remove-control-document
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/deny-delete-permision-owner

Change URL in new Firebase (from May 2016)

Earlier when using Firebase, there was an option to use our own url like myapp.firebaseapp.com (including firebaseapp.com part). But from May 2016, when I create a project, it gets an auto-generated URL like my-app-1c75b.firebaseio.com, and I cannot find place to edit that (because 1c75b part in URL is not nice). I want to know is there any way to edit that like before?
Note - I don't want to use a paid domain like www.example.com. I just want to customize my Firebase URL as myapp.firebaseapp.com
When you create a project in the new Firebase console, it will indeed add a "random" code to the project name. There is currently no way to prevent this code in the new console.
When you upgrade an existing project from firebase.com into the new console, the app name will remain unchanged. So if you already have myapp.firebaseapp.com on a firebase.com project, you will keep that URL after importing/upgrading.
When creating a new project, you get an screen where you can enter the name.
In the textfield for project-id ou can enter a project-id.
your project-id needs to include a dash
when it doesn't, it will say something like, it is already used or it places the dash itself, with some custom characters.
The project-id itself is fixed, so you should create a new project and copy everything.
When you create your project the url is based on the project name you give. If your project name is "Foo Bar", your url will be https://foo-bar.firebaseapp.com (assuming it isn't already taken).
Last week Create Project window was showing possible firebase.com subdomain that will be assigned while you were typing project name. It's first come - first served basis so if you type a name already taken it automatically adds some character-number combination at the end.
Today same window doesn't show that while typing, you can only see it after you create your project and go to settings dashboard, there is no way to change given subdomain on the same dashboard.
Update 10.07.2017
I'm getting random hex number added from time to time, I can't always get plain name even if name is supposedly original one.
If you choose a name unique enough within Firebase, they will give you a domain for your app as in https://myapp.firebaseio.com.
I tried several times, sometimes it gives something like https://project-(long-random-number-sequence).firebaseio.com and other times something like what you've encountered. My personal experience shows if you give your app a name suffixed with "app" then you have a higher chance of being unique and getting the "nice" URL.
Scroll down in 'Manage Site' and create a new site, then deploy there.
You can't change your domain, but you can change the host! You can make as many sites as you want.

Python-Firebase How to Access Main Directory using Put and Post

I'm working with python-firebase. I've been trying to access the root folder, but I've been unable to do so with the post and put commands. For example, I need to do:
database.post (root, {"HELLO" : "HELLO"})
but the best I can do is two directories down. Can anyone help?
Check out this post on getting started with Firebase. The example uses a put.
In short, you can simply do:
firebase.put('/test', 'testing/tester/test', putData)
Each / defines another route down. So, in the above example, that is 3 levels down from the root. Just keep adding / the further you want to go.

Upload file with CMIS Service on st:site

I have been uploading files to Company Home pretty easily with this url:
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/children
Now I am trying to upload to a folder within a site
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/st:sites/cm:mysite/children
And keep getting this
Cannot find object for NodePathReference[storeRef=workspace://SpacesStore,path=app:company_home/st:sites/cm:mysite]
Am I missing a special way to declare the path of a site?
i'm not sure how you are uploading to that path but i suppose you need to go into 'documentLibrary' of the site
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/st:sites/cm:mysite/cm:documentLibrary/children
I found out that there are 6 webscripts related to file manipulation, and it seams each one takes the path in a different way.
I ended up using
http://example.com:8080/alfresco/s/cmis/p/Sites/mySite/Test/children
This particular service it takes Display Names as path segments, and the p itself represents the Company Home segment
I also obtained the same results with this one
http://example.com:8080/alfresco/s/cmis/s/workspace:SpacesStore/i/2aa692bd-0dab-4514-a629-ad36382189f2/children
Which as you can see takes nodeRef Ids as parameter.

Resources